emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: x-display-pixel-width/height inconsistency


From: martin rudalics
Subject: Re: x-display-pixel-width/height inconsistency
Date: Wed, 03 Jul 2013 11:27:05 +0200

> display-monitor-attributes-list returns geometry = (0 0 1920 1080) and
> workarea = (0 0 1920 1040)
>
> Now, according to frame-pixel-(width|height):
>
> - (fullscreen . fullscreen) frame = 1920 x 1060
> - (fullscreen . maximized) frame = 1904 x 982
> - maximized frame (Windows window manager style, i.e., clicking on the
> maximize button) = 1920 x 998

Could you please add the function below, make a frame, and call the
function for a fullscreen and maximized frame with both CLIENT nil and
t.  I'd like to compare these rather than what frame-pixel-... return.

Thanks, martin


DEFUN ("w32-frame-rect", Fw32_frame_rect, Sw32_frame_rect, 0, 2, 0,
       doc: /* Return boundary rectangle of FRAME in screen coordinates.
FRAME must be a live frame and defaults to the selected one.

The boundary rectangle is a list of four elements, specifying the left,
top, right and bottom screen coordinates of FRAME including menu and
title bar and decorations.  Optional argument CLIENT non-nil means to
return the boundaries of the client rectangle which excludes menu and
title bar and decorations.  */)
  (Lisp_Object frame, Lisp_Object client)
{
  struct frame *f = decode_live_frame (frame);
  RECT rect;

  if (!NILP (client))
    GetClientRect (FRAME_W32_WINDOW (f), &rect);
  else
    GetWindowRect (FRAME_W32_WINDOW (f), &rect);

  return list4 (make_number (rect.left), make_number (rect.top),
                make_number (rect.right), make_number (rect.bottom));
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]