!IsWindowVisible && SetMenu

Michal Janusz Miroslaw M.Miroslaw at elka.pw.edu.pl
Wed Apr 16 04:51:20 CDT 2003


When an app creates window without a menu, and later adds the menu without
showing the window first, window's size doesn't update. Removing one if()
in menu.c (as in patch attached) fixes it. (At least in DesignWorks 3.20.
The app still hangs after showing it's windows, but at least menu is ok :).
Is it a good fix, or the update should happen somewhere else when window
is not visible ?

 -- Michal Miroslaw

Index: controls/menu.c
===================================================================
RCS file: /home/wine/wine/controls/menu.c,v
retrieving revision 1.163
diff -u -r1.163 menu.c
--- controls/menu.c	7 Mar 2003 23:03:27 -0000	1.163
+++ controls/menu.c	16 Apr 2003 09:43:49 -0000
@@ -3779,7 +3779,6 @@
     }
     SetWindowLongA( hWnd, GWL_ID, (LONG_PTR)hMenu );
 
-    if (IsWindowVisible(hWnd))
         SetWindowPos( hWnd, 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |
                       SWP_NOACTIVATE | SWP_NOZORDER | SWP_FRAMECHANGED );
     return TRUE;



More information about the wine-devel mailing list