Fix system metrics 2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Currently SM_CYMAXIMIZED is computed as 'height of screen -45'.
Now, why -45?

The reason is that this value is based on a default Win95 installation
which has the 'start menu' at the bottom. But even on Windows the size
of this menu bar can vary (the user can resize it), and I have even seen
users put it on the side! On Linux it may be there or not be there
depending on the Windows manager/desktop (Gnome/KDE). Similarly its size
changes from distribution to distribution. So until we can query the
window manager/desktop as to the actual size of the reserved area I
think we should just hard-code SM_CYMAXIMIZED at 'height of screen + 2
borders', just like for SM_CXMAXIMIZED.


 Changelog:

 * windows/sysmetrics.c

   Compute SM_CYMAXIMIZED purely based on the screen height until we
know how to take into account 'start menus' correctly.


-- 
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
              Linux: Because rebooting is for adding new hardware


Index: windows/sysmetrics.c
===================================================================
RCS file: /home/wine/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	1 Nov 2002 01:50:35 -0000
@@ -231,14 +231,10 @@
     sysMetrics[SM_CYMINIMIZED] = 24;

     /* FIXME: How do I calculate these? */
-    sysMetrics[SM_CXMAXTRACK] =
-	sysMetrics[SM_CXSCREEN] + 4 + 2 * sysMetrics[SM_CXFRAME];
-    sysMetrics[SM_CYMAXTRACK] =
-	sysMetrics[SM_CYSCREEN] + 4 + 2 * sysMetrics[SM_CYFRAME];
-    sysMetrics[SM_CXMAXIMIZED] =
-	sysMetrics[SM_CXSCREEN] + 2 * sysMetrics[SM_CXFRAME];
-    sysMetrics[SM_CYMAXIMIZED] =
-	sysMetrics[SM_CYSCREEN] - 45;
+    sysMetrics[SM_CXMAXTRACK] = sysMetrics[SM_CXSCREEN] + 4 + 2 * sysMetrics[SM_CXFRAME];
+    sysMetrics[SM_CYMAXTRACK] = sysMetrics[SM_CYSCREEN] + 4 + 2 * sysMetrics[SM_CYFRAME];
+    sysMetrics[SM_CXMAXIMIZED] = sysMetrics[SM_CXSCREEN] + 2 * sysMetrics[SM_CXFRAME];
+    sysMetrics[SM_CYMAXIMIZED] = sysMetrics[SM_CYSCREEN] + 2 * sysMetrics[SM_CXFRAME];
     sysMetrics[SM_NETWORK] = 3;

     /* For the following: 0 = ok, 1 = failsafe, 2 = failsafe + network */



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux