[Bug 48] - PrgWin95/98: System metrics differ from the Win9x values

wine-bugs at winehq.com wine-bugs at winehq.com
Wed Oct 30 20:34:18 CST 2002


http://bugs.winehq.com/show_bug.cgi?id=48





------- Additional Comments From tony_lambregts at telusplanet.net  2002-10-30 20:34 -------
                 Wine        Win98 
SM_CYVTHUMB      15          16      See Note 1
SM_CXHTHUMB      15          16      See Note 1

SM_CXSMSIZE      15          13      Hard Coded at 15 also used for SM_CYSMSIZE

SM_CYMAXIMIZED   sh-5        sh+8    SM_CYSCREEN - 45 see Note 2

SM_CXMENUCHECK   14          13      Hard Coded at 14
SM_CYMENUCHECK   14          13      Hard Coded at 14

Note 1. when winelook is greater than win31 These values are gotten indirectly
from the registry and 1 is added to the value when it shouldn't AFAICT

Note 2. sysMetrics[SM_CYSCREEN] = GetDeviceCaps( hdc, VERTRES )

Do we care very much about sysmetrics for winelook win31 if not the following
patch should close this bug. If you want I could doa patch using checks for
winelook > win31

Index: sysmetrics.c
===================================================================
RCS file: /home/wine/wine/windows/sysmetrics.c,v
retrieving revision 1.30
diff -u -r1.30 sysmetrics.c
--- sysmetrics.c	28 Aug 2002 00:54:53 -0000	1.30
+++ sysmetrics.c	31 Oct 2002 02:29:30 -0000
@@ -163,7 +163,7 @@
     sysMetrics[SM_WINE_BPP] = GetDeviceCaps( hdc, BITSPIXEL );
     sysMetrics[SM_CXBORDER] = 1;
     sysMetrics[SM_CYBORDER] = sysMetrics[SM_CXBORDER];
-    sysMetrics[SM_CYVTHUMB] = sysMetrics[SM_CXVSCROLL] - 1;
+    sysMetrics[SM_CYVTHUMB] = sysMetrics[SM_CXVSCROLL];
     sysMetrics[SM_CXHTHUMB] = sysMetrics[SM_CYVTHUMB];
     sysMetrics[SM_CXICON] = 32;
     sysMetrics[SM_CYICON] = 32;
@@ -220,8 +220,8 @@
     sysMetrics[SM_CXSMICON] = sysMetrics[SM_CYSIZE] - (sysMetrics[SM_CYSIZE] % 2);
     sysMetrics[SM_CYSMICON] = sysMetrics[SM_CXSMICON];
     sysMetrics[SM_CYSMCAPTION] = 16;
-    sysMetrics[SM_CXSMSIZE] = 15;
-    sysMetrics[SM_CYSMSIZE] = sysMetrics[SM_CXSMSIZE];
+    sysMetrics[SM_CXSMSIZE] = 13;
+    sysMetrics[SM_CYSMSIZE] = 15;
     sysMetrics[SM_CXMENUSIZE] = sysMetrics[SM_CYMENU] - 1;
     sysMetrics[SM_CYMENUSIZE] = sysMetrics[SM_CXMENUSIZE];
 
@@ -238,7 +238,7 @@
     sysMetrics[SM_CXMAXIMIZED] =
 	sysMetrics[SM_CXSCREEN] + 2 * sysMetrics[SM_CXFRAME];
     sysMetrics[SM_CYMAXIMIZED] =
-
sysMetrics[SM_CYSCREEN] - 45;
+
sysMetrics[SM_CYSCREEN] - 32;
     sysMetrics[SM_NETWORK] = 3;
 
     /* For the following: 0 = ok, 1 = failsafe, 2 = failsafe + network */
@@ -246,8 +246,8 @@
 
     sysMetrics[SM_CXDRAG] = 2;
     sysMetrics[SM_CYDRAG] = 2;
-    sysMetrics[SM_CXMENUCHECK] = 14;
-    sysMetrics[SM_CYMENUCHECK] = 14;
+    sysMetrics[SM_CXMENUCHECK] = 13;
+    sysMetrics[SM_CYMENUCHECK] = 13;
 
     /* FIXME: Should check the type of processor for the following */
     sysMetrics[SM_SLOWMACHINE] = 0;


DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://bugs.winehq.com/show_bug.cgi?id=48>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.



More information about the wine-bugs mailing list