unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: emacs-devel@gnu.org
Subject: Re: x-display-pixel-width/height inconsistency
Date: Wed, 08 May 2013 19:46:51 +0900	[thread overview]
Message-ID: <wlr4hh92as.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <wlli7sr5v1.wl%mituharu@math.s.chiba-u.ac.jp>

I also tried implementing a W32 version of multi-monitor support, but
I can't test it (I didn't even compile, actually).  Please test it.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

=== modified file 'lisp/frame.el'
*** lisp/frame.el	2013-05-07 01:12:22 +0000
--- lisp/frame.el	2013-05-08 10:10:09 +0000
***************
*** 1365,1371 ****
  
  (defun display-pixel-height (&optional display)
    "Return the height of DISPLAY's screen in pixels.
! For character terminals, each character counts as a single pixel."
    (let ((frame-type (framep-on-display display)))
      (cond
       ((memq frame-type '(x w32 ns))
--- 1365,1375 ----
  
  (defun display-pixel-height (&optional display)
    "Return the height of DISPLAY's screen in pixels.
! For character terminals, each character counts as a single pixel.
! For graphical terminals, note that on \"multi-monitor\" setups this
! refers to the pixel height for all physical monitors associated
! with DISPLAY.  To get information for each physical monitor, use
! `display-monitor-attributes-list'."
    (let ((frame-type (framep-on-display display)))
      (cond
       ((memq frame-type '(x w32 ns))
***************
*** 1377,1383 ****
  
  (defun display-pixel-width (&optional display)
    "Return the width of DISPLAY's screen in pixels.
! For character terminals, each character counts as a single pixel."
    (let ((frame-type (framep-on-display display)))
      (cond
       ((memq frame-type '(x w32 ns))
--- 1381,1391 ----
  
  (defun display-pixel-width (&optional display)
    "Return the width of DISPLAY's screen in pixels.
! For character terminals, each character counts as a single pixel.
! For graphical terminals, note that on \"multi-monitor\" setups this
! refers to the pixel width for all physical monitors associated
! with DISPLAY.  To get information for each physical monitor, use
! `display-monitor-attributes-list'."
    (let ((frame-type (framep-on-display display)))
      (cond
       ((memq frame-type '(x w32 ns))
***************
*** 1408,1414 ****
  (defun display-mm-height (&optional display)
    "Return the height of DISPLAY's screen in millimeters.
  System values can be overridden by `display-mm-dimensions-alist'.
! If the information is unavailable, value is nil."
    (and (memq (framep-on-display display) '(x w32 ns))
         (or (cddr (assoc (or display (frame-parameter nil 'display))
  			display-mm-dimensions-alist))
--- 1416,1426 ----
  (defun display-mm-height (&optional display)
    "Return the height of DISPLAY's screen in millimeters.
  System values can be overridden by `display-mm-dimensions-alist'.
! If the information is unavailable, value is nil.
! For graphical terminals, note that on \"multi-monitor\" setups this
! refers to the height in millimeters for all physical monitors
! associated with DISPLAY.  To get information for each physical
! monitor, use `display-monitor-attributes-list'."
    (and (memq (framep-on-display display) '(x w32 ns))
         (or (cddr (assoc (or display (frame-parameter nil 'display))
  			display-mm-dimensions-alist))
***************
*** 1420,1426 ****
  (defun display-mm-width (&optional display)
    "Return the width of DISPLAY's screen in millimeters.
  System values can be overridden by `display-mm-dimensions-alist'.
! If the information is unavailable, value is nil."
    (and (memq (framep-on-display display) '(x w32 ns))
         (or (cadr (assoc (or display (frame-parameter nil 'display))
  			display-mm-dimensions-alist))
--- 1432,1442 ----
  (defun display-mm-width (&optional display)
    "Return the width of DISPLAY's screen in millimeters.
  System values can be overridden by `display-mm-dimensions-alist'.
! If the information is unavailable, value is nil.
! For graphical terminals, note that on \"multi-monitor\" setups this
! refers to the width in millimeters for all physical monitors
! associated with DISPLAY.  To get information for each physical
! monitor, use `display-monitor-attributes-list'."
    (and (memq (framep-on-display display) '(x w32 ns))
         (or (cadr (assoc (or display (frame-parameter nil 'display))
  			display-mm-dimensions-alist))
***************
*** 1495,1500 ****
--- 1511,1518 ----
  
  (declare-function x-display-monitor-attributes-list "xfns.c"
  		  (&optional terminal))
+ (declare-function w32-display-monitor-attributes-list "w32fns.c"
+ 		  (&optional display))
  
  (defun display-monitor-attributes-list (&optional display)
    "Return a list of physical monitor attributes on DISPLAY.
***************
*** 1528,1533 ****
--- 1546,1553 ----
      (cond
       ((eq frame-type 'x)
        (x-display-monitor-attributes-list display))
+      ((eq frame-type 'w32)
+       (w32-display-monitor-attributes-list display))
       (t
        (let ((geometry (list 0 0 (display-pixel-width display)
  			    (display-pixel-height display))))

=== modified file 'src/w32fns.c'
*** src/w32fns.c	2013-05-04 10:19:13 +0000
--- src/w32fns.c	2013-05-08 10:32:32 +0000
***************
*** 106,111 ****
--- 106,112 ----
  Lisp_Object Qctrl;
  Lisp_Object Qcontrol;
  Lisp_Object Qshift;
+ static Lisp_Object Qgeometry, Qworkarea, Qmm_size, Qframes;
  
  
  /* Prefix for system colors.  */
***************
*** 131,136 ****
--- 132,146 ----
  #ifndef MONITOR_DEFAULT_TO_NEAREST
  #define MONITOR_DEFAULT_TO_NEAREST 2
  #endif
+ #ifndef MONITORINFOF_PRIMARY
+ #define MONITORINFOF_PRIMARY 1
+ #endif
+ #ifndef SM_XVIRTUALSCREEN
+ #define SM_XVIRTUALSCREEN 76
+ #endif
+ #ifndef SM_YVIRTUALSCREEN
+ #define SM_YVIRTUALSCREEN 77
+ #endif
  /* MinGW headers define MONITORINFO unconditionally, but MSVC ones don't.
     To avoid a compile error on one or the other, redefine with a new name.  */
  struct MONITOR_INFO
***************
*** 141,146 ****
--- 151,168 ----
      DWORD   dwFlags;
  };
  
+ #ifndef CCHDEVICENAME
+ #define CCHDEVICENAME 32
+ #endif
+ struct MONITOR_INFO_EX
+ {
+     DWORD   cbSize;
+     RECT    rcMonitor;
+     RECT    rcWork;
+     DWORD   dwFlags;
+     char    szDevice[CCHDEVICENAME];
+ };
+ 
  /* Reportedly, MSVC does not have this in its headers.  */
  #if defined (_MSC_VER) && _WIN32_WINNT < 0x0500
  DECLARE_HANDLE(HMONITOR);
***************
*** 159,164 ****
--- 181,190 ----
    (IN HMONITOR monitor, OUT struct MONITOR_INFO* info);
  typedef HMONITOR (WINAPI * MonitorFromWindow_Proc)
    (IN HWND hwnd, IN DWORD dwFlags);
+ typedef BOOL CALLBACK (* MonitorEnum_Proc)
+   (IN HMONITOR monitor, IN HDC hdc, IN RECT *rcMonitor, IN LPARAM dwData);
+ typedef BOOL (WINAPI * EnumDisplayMonitors_Proc)
+   (IN HDC hdc, IN RECT *rcClip, IN MonitorEnum_Proc fnEnum, IN LPARAM dwData);
  
  TrackMouseEvent_Proc track_mouse_event_fn = NULL;
  ImmGetCompositionString_Proc get_composition_string_fn = NULL;
***************
*** 168,173 ****
--- 194,200 ----
  MonitorFromPoint_Proc monitor_from_point_fn = NULL;
  GetMonitorInfo_Proc get_monitor_info_fn = NULL;
  MonitorFromWindow_Proc monitor_from_window_fn = NULL;
+ EnumDisplayMonitors_Proc enum_display_monitors_fn = NULL;
  
  #ifdef NTGUI_UNICODE
  #define unicode_append_menu AppendMenuW
***************
*** 4656,4662 ****
         doc: /* Return the width in pixels of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
--- 4683,4693 ----
         doc: /* Return the width in pixels of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.
! 
! On \"multi-monitor\" setups this refers to the pixel width for all
! physical monitors associated with DISPLAY.  To get information for
! each physical monitor, use `display-monitor-attributes-list'.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
***************
*** 4669,4675 ****
         doc: /* Return the height in pixels of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
--- 4700,4710 ----
         doc: /* Return the height in pixels of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.
! 
! On \"multi-monitor\" setups this refers to the pixel height for all
! physical monitors associated with DISPLAY.  To get information for
! each physical monitor, use `display-monitor-attributes-list'.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
***************
*** 4761,4801 ****
         doc: /* Return the height in millimeters of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    HDC hdc;
!   int cap;
  
!   hdc = GetDC (dpyinfo->root_window);
  
!   cap = GetDeviceCaps (hdc, VERTSIZE);
! 
!   ReleaseDC (dpyinfo->root_window, hdc);
! 
!   return make_number (cap);
  }
  
  DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
         doc: /* Return the width in millimeters of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
- 
    HDC hdc;
!   int cap;
! 
!   hdc = GetDC (dpyinfo->root_window);
  
!   cap = GetDeviceCaps (hdc, HORZSIZE);
  
!   ReleaseDC (dpyinfo->root_window, hdc);
! 
!   return make_number (cap);
  }
  
  DEFUN ("x-display-backing-store", Fx_display_backing_store,
--- 4796,4841 ----
         doc: /* Return the height in millimeters of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.
! 
! On \"multi-monitor\" setups this refers to the height in millimeters for
! all physical monitors associated with DISPLAY.  To get information
! for each physical monitor, use `display-monitor-attributes-list'.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    HDC hdc;
!   double mm_per_pixel;
  
!   hdc = GetDC (NULL);
!   mm_per_pixel = ((double) GetDeviceCaps (hdc, VERTSIZE)
! 		  / GetDeviceCaps (hdc, VERTRES));
!   ReleaseDC (NULL, hdc);
  
!   return make_number (x_display_pixel_height (dpyinfo) * mm_per_pixel + 0.5);
  }
  
  DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
         doc: /* Return the width in millimeters of DISPLAY.
  The optional argument DISPLAY specifies which display to ask about.
  DISPLAY should be either a frame or a display name (a string).
! If omitted or nil, that stands for the selected frame's display.
! 
! On \"multi-monitor\" setups this refers to the width in millimeters for
! all physical monitors associated with TERMINAL.  To get information
! for each physical monitor, use `display-monitor-attributes-list'.  */)
    (Lisp_Object display)
  {
    struct w32_display_info *dpyinfo = check_x_display_info (display);
    HDC hdc;
!   double mm_per_pixel;
  
!   hdc = GetDC (NULL);
!   mm_per_pixel = ((double) GetDeviceCaps (hdc, HORZSIZE)
! 		  / GetDeviceCaps (hdc, HORZRES));
!   ReleaseDC (NULL, hdc);
  
!   return make_number (x_display_pixel_width (dpyinfo) * mm_per_pixel + 0.5);
  }
  
  DEFUN ("x-display-backing-store", Fx_display_backing_store,
***************
*** 4847,4852 ****
--- 4887,5078 ----
    return Qnil;
  }
  
+ static BOOL CALLBACK
+ w32_monitor_enum (HMONITOR monitor, HDC hdc, RECT *rcMonitor, LPARAM dwData)
+ {
+   Lisp_Object *monitor_list = (Lisp_Object *) dwData;
+ 
+   *monitor_list = Fcons (make_save_pointer (monitor), *monitor_list);
+ 
+   return TRUE;
+ }
+ 
+ static Lisp_Object
+ w32_display_monitor_attributes_list (void)
+ {
+   Lisp_Object attributes_list = Qnil, primary_monitor_attributes = Qnil;
+   Lisp_Object monitor_list, monitor_frames, rest, frame;
+   int i, n_monitors;
+   HMONITOR *monitors;
+ 
+   if (!(enum_display_monitors_fn && get_monitor_info_fn
+ 	&& monitor_from_window_fn))
+     return Qnil;
+ 
+   if (!enum_display_monitors_fn (NULL, NULL, w32_monitor_enum, &monitor_list)
+       || NILP (monitor_list))
+     return Qnil;
+ 
+   n_monitors = 0;
+   for (rest = monitor_list; CONSP (rest); rest = XCDR (rest))
+     n_monitors++;
+ 
+   monitors = xmalloc (n_monitors * sizeof (*monitors));
+   for (i = 0; i < n_monitors; i++)
+     {
+       monitors[i] = XSAVE_POINTER (XCAR (monitor_list), 0);
+       monitor_list = XCDR (monitor_list);
+     }
+ 
+   monitor_frames = Fmake_vector (make_number (n_monitors), Qnil);
+   FOR_EACH_FRAME (rest, frame)
+     {
+       struct frame *f = XFRAME (frame);
+ 
+       if (FRAME_W32_P (f) && FRAME_W32_DISPLAY_INFO (f) == dpyinfo
+ 	  && !EQ (frame, tip_frame))
+ 	{
+ 	  HMONITOR monitor =
+ 	    monitor_from_window_fn (FRAME_W32_WINDOW (f),
+ 				    MONITOR_DEFAULT_TO_NEAREST);
+ 
+ 	  for (i = 0; i < n_monitors; i++)
+ 	    if (monitors[i] == monitor)
+ 	      break;
+ 
+ 	  ASET (monitor_frames, i, Fcons (frame, AREF (monitor_frames, i)));
+ 	}
+     }
+ 
+   for (i = 0; i < n_monitors; i++)
+     {
+       Lisp_Object geometry, workarea, name, attributes = Qnil;
+       HDC hdc;
+       int width_mm, height_mm;
+       struct MONITOR_INFO_EX mi;
+ 
+       attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)),
+ 			  attributes);
+ 
+       mi.cbSize = sizeof (mi);
+       get_monitor_info_fn (monitors[i], (struct MONITOR_INFO *) &mi);
+ 
+       name = make_unibyte_string (mi.szDevice, strlen (mi.szDevice));
+       attributes = Fcons (Fcons (Qname, name), attributes);
+ 
+       hdc = CreateDCA ("DISPLAY", mi.szDevice, NULL, NULL);
+       width_mm = GetDeviceCaps (hdc, HORZSIZE);
+       height_mm = GetDeviceCaps (hdc, VERTSIZE);
+       DeleteDC (hdc);
+       attributes = Fcons (Fcons (Qmm_size, list2i (width_mm, height_mm)),
+ 			  attributes);
+ 
+       workarea = list4i (mi.rcWork.left, mi.rcWork.top,
+ 			 mi.rcWork.right - mi.rcWork.left,
+ 			 mi.rcWork.bottom - mi.rcWork.top);
+       attributes = Fcons (Fcons (Qworkarea, workarea), attributes);
+ 
+       geometry = list4i (mi.rcMonitor.left, mi.rcMonitor.top,
+ 			 mi.rcMonitor.right - mi.rcMonitor.left,
+ 			 mi.rcMonitor.bottom - mi.rcMonitor.top);
+       attributes = Fcons (Fcons (Qgeometry, geometry), attributes);
+ 
+       if (mi.dwFlags & MONITORINFOF_PRIMARY)
+ 	primary_monitor_attributes = attributes;
+       else
+ 	attributes_list = Fcons (attributes, attributes_list);
+     }
+ 
+   if (!NILP (primary_monitor_attributes))
+     attributes_list = Fcons (primary_monitor_attributes, attributes_list);
+ 
+   xfree (monitors);
+ 
+   return attributes_list;
+ }
+ 
+ static Lisp_Object
+ w32_display_monitor_attributes_list_fallback (void)
+ {
+   Lisp_Object geometry, workarea, frames, attributes = Qnil;
+   HDC hdc;
+   double mm_per_pixel;
+   int pixel_width, pixel_height, width_mm, height_mm;
+   RECT workarea_rect;
+ 
+   /* Fallback: treat (possibly) multiple physical monitors as if they
+      formed a single monitor as a whole.  This should provide a
+      consistent result at least on single monitor environments.  */
+   attributes = Fcons (Fcons (Qname, build_string ("combined screen"),
+ 			     attributes));
+ 
+   frames = Qnil;
+   FOR_EACH_FRAME (rest, frame)
+     {
+       struct frame *f = XFRAME (frame);
+ 
+       if (FRAME_W32_P (f) && FRAME_W32_DISPLAY_INFO (f) == dpyinfo
+ 	  && !EQ (frame, tip_frame))
+ 	frames = Fcons (frame, frames);
+     }
+   attributes = Fcons (Fcons (Qframes, frames), attributes);
+ 
+   pixel_width = x_display_pixel_width (dpyinfo);
+   pixel_height = x_display_pixel_height (dpyinfo);
+ 
+   hdc = GetDC (NULL);
+   mm_per_pixel = ((double) GetDeviceCaps (hdc, HORZSIZE)
+ 		  / GetDeviceCaps (hdc, HORZRES));
+   width_mm = pixel_width * mm_per_pixel + 0.5;
+   mm_per_pixel = ((double) GetDeviceCaps (hdc, VERTSIZE)
+ 		  / GetDeviceCaps (hdc, VERTRES));
+   height_mm = pixel_height * mm_per_pixel + 0.5;
+   ReleaseDC (NULL, hdc);
+   attributes = Fcons (Fcons (Qmm_size, list2i (width_mm, height_mm)),
+ 		      attributes);
+ 
+   /* GetSystemMetrics below may return 0 for Windows 95 or NT 4.0, but
+      we don't care.  */
+   geometry = list4i (GetSystemMetrics (SM_XVIRTUALSCREEN),
+ 		     GetSystemMetrics (SM_YVIRTUALSCREEN),
+ 		     pixel_width, pixel_height);
+   if (SystemParametersInfo (SPI_GETWORKAREA, 0, &workarea_rect, 0))
+     workarea = list4i (workarea_rect.left, workarea_rect.top,
+ 		       workarea_rect.right - workarea_rect.left,
+ 		       workarea_rect.bottom - workarea_rect.top);
+   else
+     workarea = geometry;
+   attributes = Fcons (Fcons (Qworkarea, workarea), attributes);
+ 
+   attributes = Fcons (Fcons (Qgeometry, geometry), attributes);
+ 
+   return list1 (attributes);
+ }
+ 
+ DEFUN ("w32-display-monitor-attributes-list", Fw32_display_monitor_attributes_list,
+        Sw32_display_monitor_attributes_list,
+        0, 1, 0,
+        doc: /* Return a list of physical monitor attributes on the W32 display DISPLAY.
+ 
+ The optional argument DISPLAY specifies which display to ask about.
+ DISPLAY should be either a frame or a display name (a string).
+ If omitted or nil, that stands for the selected frame's display.
+ 
+ Internal use only, use `display-monitor-attributes-list' instead.  */)
+   (Lisp_Object display)
+ {
+   struct w32_display_info *dpyinfo = check_x_display_info (display);
+   Lisp_Object attributes_list;
+ 
+   block_input ();
+   attributes_list = w32_display_monitor_attributes_list ();
+   if (NILP (attributes_list))
+     attributes_list = w32_display_monitor_attributes_list_fallback ();
+   unblock_input ();
+ 
+   return attributes_list;
+ }
+ 
  DEFUN ("set-message-beep", Fset_message_beep, Sset_message_beep, 1, 1, 0,
         doc: /* Set the sound generated when the bell is rung.
  SOUND is 'asterisk, 'exclamation, 'hand, 'question, 'ok, or 'silent
***************
*** 7339,7344 ****
--- 7565,7574 ----
    DEFSYM (Qcontrol, "control");
    DEFSYM (Qshift, "shift");
    DEFSYM (Qfont_param, "font-parameter");
+   DEFSYM (Qgeometry, "geometry");
+   DEFSYM (Qworkarea, "workarea");
+   DEFSYM (Qmm_size, "mm-size");
+   DEFSYM (Qframes, "frames");
    /* This is the end of symbol initialization.  */
  
  
***************
*** 7617,7622 ****
--- 7847,7853 ----
    defsubr (&Sx_display_visual_class);
    defsubr (&Sx_display_backing_store);
    defsubr (&Sx_display_save_under);
+   defsubr (&Sw32_display_monitor_attributes_list);
    defsubr (&Sx_create_frame);
    defsubr (&Sx_open_connection);
    defsubr (&Sx_close_connection);
***************
*** 7689,7694 ****
--- 7920,7927 ----
      GetProcAddress (user32_lib, "GetMonitorInfoA");
    monitor_from_window_fn = (MonitorFromWindow_Proc)
      GetProcAddress (user32_lib, "MonitorFromWindow");
+   enum_display_monitors_fn = (EnumDisplayMonitors_Proc)
+     GetProcAddress (user32_lib, "EnumDisplayMonitors");
  
    {
      HMODULE imm32_lib = GetModuleHandle ("imm32.dll");

=== modified file 'src/w32term.c'
*** src/w32term.c	2013-04-14 00:58:45 +0000
--- src/w32term.c	2013-04-28 07:04:08 +0000
***************
*** 143,148 ****
--- 143,157 ----
  #define WS_EX_LAYERED 0x80000
  #endif
  
+ /* SM_CXVIRTUALSCREEN and SM_CYVIRTUALSCREEN are not defined on 95 and
+    NT4.  */
+ #ifndef SM_CXVIRTUALSCREEN
+ #define SM_CXVIRTUALSCREEN 78
+ #endif
+ #ifndef SM_CYVIRTUALSCREEN
+ #define SM_CXVIRTUALSCREEN 79
+ #endif
+ 
  /* This is a frame waiting to be autoraised, within w32_read_socket.  */
  struct frame *pending_autoraise_frame;
  
***************
*** 516,534 ****
  int
  x_display_pixel_height (struct w32_display_info *dpyinfo)
  {
!   HDC dc = GetDC (NULL);
!   int pixels = GetDeviceCaps (dc, VERTRES);
!   ReleaseDC (NULL, dc);
!   return pixels;
  }
  
  int
  x_display_pixel_width (struct w32_display_info *dpyinfo)
  {
!   HDC dc = GetDC (NULL);
!   int pixels = GetDeviceCaps (dc, HORZRES);
!   ReleaseDC (NULL, dc);
!   return pixels;
  }
  
  \f
--- 525,541 ----
  int
  x_display_pixel_height (struct w32_display_info *dpyinfo)
  {
!   return (GetSystemMetrics (SM_CYVIRTUALSCREEN)
! 	  /* Fallback for Windows 95 or NT 4.0.  */
! 	  || GetSystemMetrics (SM_CYSCREEN));
  }
  
  int
  x_display_pixel_width (struct w32_display_info *dpyinfo)
  {
!   return (GetSystemMetrics (SM_CXVIRTUALSCREEN)
! 	  /* Fallback for Windows 95 or NT 4.0.  */
! 	  || GetSystemMetrics (SM_CXSCREEN));
  }
  
  \f




  parent reply	other threads:[~2013-05-08 10:46 UTC|newest]

Thread overview: 97+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21  0:58 x-display-pixel-width/height inconsistency grischka
2013-03-21  1:05 ` YAMAMOTO Mitsuharu
2013-03-21  1:09   ` grischka
2013-03-21  1:44     ` YAMAMOTO Mitsuharu
2013-03-21 23:29       ` YAMAMOTO Mitsuharu
2013-03-22 10:33         ` Eli Zaretskii
2013-03-23  0:32           ` YAMAMOTO Mitsuharu
2013-03-23  6:15             ` Eli Zaretskii
2013-03-23 13:35               ` Jan Djärv
2013-03-23 23:58               ` YAMAMOTO Mitsuharu
2013-03-24  3:53                 ` Eli Zaretskii
2013-03-24  4:36                   ` YAMAMOTO Mitsuharu
2013-03-24 16:19                     ` Eli Zaretskii
2013-04-27  5:13                     ` YAMAMOTO Mitsuharu
2013-04-27  8:04                       ` Jan Djärv
2013-04-28  1:40                         ` YAMAMOTO Mitsuharu
2013-04-28 17:16                           ` Jan D.
2013-04-29  2:27                             ` YAMAMOTO Mitsuharu
2013-04-29  2:42                               ` YAMAMOTO Mitsuharu
2013-05-01  9:58                               ` Jan Djärv
2013-05-02  4:09                                 ` YAMAMOTO Mitsuharu
2013-05-06  1:04                                   ` YAMAMOTO Mitsuharu
2013-05-06  1:55                                     ` Stefan Monnier
2013-05-06  6:15                                       ` YAMAMOTO Mitsuharu
2013-05-06 13:37                                         ` Stefan Monnier
2013-05-08 10:46                                         ` YAMAMOTO Mitsuharu [this message]
2013-05-08 11:24                                           ` YAMAMOTO Mitsuharu
2013-05-08 17:41                                           ` Eli Zaretskii
2013-05-09  0:09                                             ` YAMAMOTO Mitsuharu
2013-05-09  1:52                                               ` Glenn Morris
2013-05-09  3:19                                                 ` YAMAMOTO Mitsuharu
2013-05-09  6:27                                                   ` Glenn Morris
2013-05-09  2:53                                               ` Eli Zaretskii
2013-05-09  8:14                                               ` Jan Djärv
2013-05-09  8:43                                                 ` YAMAMOTO Mitsuharu
2013-05-09 15:18                                                   ` Jan Djärv
2013-05-09 20:03                                               ` Eli Zaretskii
2013-05-09 21:28                                                 ` Stefan Monnier
2013-05-10  6:00                                                 ` YAMAMOTO Mitsuharu
2013-05-10  6:05                                                   ` YAMAMOTO Mitsuharu
2013-05-10  7:06                                                   ` Eli Zaretskii
2013-05-10  7:47                                                     ` YAMAMOTO Mitsuharu
2013-05-10  8:41                                                       ` Eli Zaretskii
2013-05-10  8:55                                                         ` YAMAMOTO Mitsuharu
2013-05-10  9:15                                                           ` Eli Zaretskii
2013-05-10  9:27                                                             ` YAMAMOTO Mitsuharu
2013-05-14 10:39                                                               ` YAMAMOTO Mitsuharu
2013-07-01  6:49                                                                 ` martin rudalics
2013-07-02  1:30                                                                   ` YAMAMOTO Mitsuharu
2013-07-02 10:38                                                                     ` martin rudalics
2013-07-02 10:53                                                                       ` Juanma Barranquero
2013-07-02 13:11                                                                         ` martin rudalics
2013-07-02 14:05                                                                           ` Juanma Barranquero
2013-07-03  9:27                                                                             ` martin rudalics
2013-07-03 10:49                                                                               ` Juanma Barranquero
2013-07-03 12:44                                                                                 ` martin rudalics
2013-07-03 13:43                                                                                   ` Juanma Barranquero
2013-07-04  9:34                                                                                     ` martin rudalics
     [not found]                                                                                       ` <5987E3>
2013-07-04 22:32                                                                                       ` Juanma Barranquero
2013-07-05  7:44                                                                                         ` martin rudalics
2013-07-05  9:32                                                                                           ` Juanma Barranquero
2013-07-05  9:34                                                                                         ` Jan Djärv
2013-07-05  9:41                                                                                           ` Juanma Barranquero
2013-07-05 11:25                                                                                             ` Jan Djärv
2013-07-05 11:56                                                                                               ` Juanma Barranquero
2013-07-05 12:12                                                                                                 ` Jan Djärv
2013-07-05 12:16                                                                                                   ` Juanma Barranquero
2013-07-05 15:30                                                                                                     ` Drew Adams
2013-07-05 15:53                                                                                                       ` Juanma Barranquero
2013-07-05 16:58                                                                                                         ` Drew Adams
2013-07-06 14:48                                                                                                           ` Juanma Barranquero
2013-07-06 19:25                                                                                                             ` Drew Adams
2013-07-05 15:27                                                                                                   ` Drew Adams
2013-07-04 10:28                                                                                     ` YAMAMOTO Mitsuharu
2013-05-10  7:44                                                   ` Jan Djärv
2013-04-28  1:48                       ` YAMAMOTO Mitsuharu
  -- strict thread matches above, loose matches on Subject: below --
2013-03-19  0:39 YAMAMOTO Mitsuharu
2013-03-19  1:34 ` Leo Liu
2013-03-19  4:54   ` Xue Fuqiao
2013-03-19 15:41     ` Drew Adams
2013-03-19 15:51       ` Leo Liu
2013-03-19 15:58         ` Drew Adams
2013-03-20  0:55           ` Leo Liu
2013-03-19 22:25 ` YAMAMOTO Mitsuharu
2013-03-19 23:15   ` Dmitry Gutov
2013-03-19 23:52     ` YAMAMOTO Mitsuharu
2013-03-20  0:12       ` Dmitry Gutov
2013-03-20  0:20         ` YAMAMOTO Mitsuharu
2013-03-20  1:41           ` Dmitry Gutov
2013-03-20  3:58             ` YAMAMOTO Mitsuharu
2013-03-20 14:05               ` Dmitry Gutov
2013-03-20 23:28                 ` YAMAMOTO Mitsuharu
2013-03-21  1:27                   ` Dmitry Gutov
2013-03-21  1:51                     ` YAMAMOTO Mitsuharu
2013-03-21  2:43                       ` Dmitry Gutov
2013-03-21  3:47                         ` YAMAMOTO Mitsuharu
2013-03-21  4:22                           ` YAMAMOTO Mitsuharu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wlr4hh92as.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).