winpos.c & module.c - minor ms-windows compatibility

Boaz Harrosh boaz at hishome.net
Tue Mar 23 01:59:27 CST 2004


Alexandre please ignore the previous patch

Changelog:
	wine/dlls/x11drv/winpos.c

On ms-windows a window would not Maximize if it didn't have the
WS_MAXIMIZEBOX style, or minimize with out the WS_MINIMIZEBOX style. 
Even if explicitly called to ShowWindow with these commands. I have 
tried a couple of different approachs but only converting the call 
command this way gives me the exact ms-windows behavior. Ignoring the 
calls will not display the window right.(SW_RESTORE)

Index: dlls/x11drv/winpos.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/winpos.c,v
retrieving revision 1.76
diff -u -r1.76 winpos.c
--- dlls/x11drv/winpos.c    11 Mar 2004 03:51:46 -0000    1.76
+++ dlls/x11drv/winpos.c    22 Mar 2004 14:28:44 -0000
@@ -1265,6 +1265,19 @@

     TRACE("hwnd=%p, cmd=%d\n", hwnd, cmd);

+    switch(cmd)
+    {
+        case SW_SHOWMINIMIZED:
+        case SW_MINIMIZE:
+            if( !(wndPtr->dwStyle & WS_MINIMIZEBOX) )
+                cmd =  SW_RESTORE;
+            break ;
+        case SW_SHOWMAXIMIZED: /*case SW_MAXIMIZE:*/
+            if( !(wndPtr->dwStyle & WS_MAXIMIZEBOX) )
+                cmd =  SW_RESTORE;
+            break ;
+    }
+
     wasVisible = (wndPtr->dwStyle & WS_VISIBLE) != 0;

     switch(cmd)





More information about the wine-patches mailing list