Index: w32fns.c =================================================================== RCS file: /sources/emacs/emacs/src/w32fns.c,v retrieving revision 1.275 diff -u -r1.275 w32fns.c --- w32fns.c 4 Aug 2006 17:21:21 -0000 1.275 +++ w32fns.c 5 Aug 2006 14:37:37 -0000 @@ -6537,15 +6537,16 @@ { struct w32_display_info *dpyinfo = check_x_display_info (display); HDC hdc; - int cap; + int height; hdc = GetDC (dpyinfo->root_window); - cap = GetDeviceCaps (hdc, VERTSIZE); + height = round (25.4 * GetDeviceCaps (hdc, VERTRES) + / GetDeviceCaps (hdc, LOGPIXELSY)); ReleaseDC (dpyinfo->root_window, hdc); - return make_number (cap); + return make_number (height); } DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0, @@ -6559,15 +6560,16 @@ struct w32_display_info *dpyinfo = check_x_display_info (display); HDC hdc; - int cap; + int width; hdc = GetDC (dpyinfo->root_window); - cap = GetDeviceCaps (hdc, HORZSIZE); + width = round (25.4 * GetDeviceCaps (hdc, HORZRES) + / GetDeviceCaps (hdc, LOGPIXELSX)); ReleaseDC (dpyinfo->root_window, hdc); - return make_number (cap); + return make_number (width); } DEFUN ("x-display-backing-store", Fx_display_backing_store,