Fix system metrics
Dimitrie O. Paun
dpaun at rogers.com
Mon Sep 23 12:14:43 CDT 2002
This one should fix bug #48:
http://bugs.winehq.com/show_bug.cgi?id=48
ChangeLog
Fix system metrics for Win9x emulation.
Index: windows/sysmetrics.c
===================================================================
RCS file: /var/cvs/wine/windows/sysmetrics.c,v
retrieving revision 1.30
diff -u -r1.30 sysmetrics.c
--- windows/sysmetrics.c 28 Aug 2002 00:54:53 -0000 1.30
+++ windows/sysmetrics.c 23 Sep 2002 17:10:47 -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] - ((TWEAK_WineLook > WIN31_LOOK) ? 0 : 1);
sysMetrics[SM_CXHTHUMB] = sysMetrics[SM_CYVTHUMB];
sysMetrics[SM_CXICON] = 32;
sysMetrics[SM_CYICON] = 32;
@@ -188,7 +188,7 @@
sysMetrics[SM_CXMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 112 : 100;
sysMetrics[SM_CYMIN] = (TWEAK_WineLook > WIN31_LOOK) ? 27 : 28;
- sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - 1;
+ sysMetrics[SM_CXSIZE] = sysMetrics[SM_CYCAPTION] - ((TWEAK_WineLook > WIN31_LOOK) ? 0 : 1);
sysMetrics[SM_CYSIZE] = sysMetrics[SM_CXSIZE];
sysMetrics[SM_CXMINTRACK] = sysMetrics[SM_CXMIN];
sysMetrics[SM_CYMINTRACK] = sysMetrics[SM_CYMIN];
@@ -220,9 +220,9 @@
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_CXMENUSIZE] = sysMetrics[SM_CYMENU] - 1;
+ sysMetrics[SM_CXSMSIZE] = (TWEAK_WineLook > WIN31_LOOK) ? 13 : 15;
+ sysMetrics[SM_CYSMSIZE] = 15;
+ sysMetrics[SM_CXMENUSIZE] = sysMetrics[SM_CYMENU] - ((TWEAK_WineLook > WIN31_LOOK) ? 2 : 1);
sysMetrics[SM_CYMENUSIZE] = sysMetrics[SM_CXMENUSIZE];
/* FIXME: What do these mean? */
@@ -238,16 +238,16 @@
sysMetrics[SM_CXMAXIMIZED] =
sysMetrics[SM_CXSCREEN] + 2 * sysMetrics[SM_CXFRAME];
sysMetrics[SM_CYMAXIMIZED] =
- sysMetrics[SM_CYSCREEN] - 45;
+ sysMetrics[SM_CYSCREEN] + ((TWEAK_WineLook > WIN31_LOOK) ? 8 : -45);
sysMetrics[SM_NETWORK] = 3;
/* For the following: 0 = ok, 1 = failsafe, 2 = failsafe + network */
sysMetrics[SM_CLEANBOOT] = 0;
sysMetrics[SM_CXDRAG] = 2;
- sysMetrics[SM_CYDRAG] = 2;
- sysMetrics[SM_CXMENUCHECK] = 14;
- sysMetrics[SM_CYMENUCHECK] = 14;
+ sysMetrics[SM_CYDRAG] = sysMetrics[SM_CXDRAG];
+ sysMetrics[SM_CXMENUCHECK] = (TWEAK_WineLook > WIN31_LOOK) ? 13 : 14;
+ sysMetrics[SM_CYMENUCHECK] = sysMetrics[SM_CXMENUCHECK];
/* FIXME: Should check the type of processor for the following */
sysMetrics[SM_SLOWMACHINE] = 0;
More information about the wine-patches
mailing list