Index: w32fns.c =================================================================== RCS file: /sources/emacs/emacs/src/w32fns.c,v retrieving revision 1.271 diff -u -r1.271 w32fns.c --- w32fns.c 30 Jun 2006 13:40:21 -0000 1.271 +++ w32fns.c 11 Jul 2006 18:38:37 -0000 @@ -6502,15 +6502,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, @@ -6524,15 +6525,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,