Revert an erroneous patch
Dmitry Timoshkov
dmitry at baikal.ru
Thu Apr 8 03:41:37 CDT 2004
Hello,
my patch which has moved WM_SHOWWINDOW sending from ShowWindow
to SetWindowPos is wrong. Replacing ShowWindow() calls in msg.c
by SetWindowPos() with SWP_SHOWWINDOW or SWP_HIDEWINDOW confirms
that. Sorry.
Changelog:
Dmitry Timoshkov <dmitry at codeweavers.com>
Revert an erroneous patch.
--- cvs/hq/wine/dlls/x11drv/winpos.c Sat Apr 03 00:59:34 2004
+++ wine/dlls/x11drv/winpos.c Thu Apr 08 08:32:48 2004
@@ -553,16 +553,6 @@ static BOOL SWP_DoWinPosChanging( WINDOW
{
WND *wndPtr;
- if (pWinpos->flags & (SWP_SHOWWINDOW | SWP_HIDEWINDOW))
- {
- BOOL wasVisible, showFlag;
-
- wasVisible = (GetWindowLongW(pWinpos->hwnd, GWL_STYLE) & WS_VISIBLE) != 0;
- showFlag = !(pWinpos->flags & SWP_HIDEWINDOW);
- if (showFlag != wasVisible)
- SendMessageW(pWinpos->hwnd, WM_SHOWWINDOW, showFlag, 0);
- }
-
/* Send WM_WINDOWPOSCHANGING message */
if (!(pWinpos->flags & SWP_NOSENDCHANGING))
@@ -1275,7 +1265,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT
BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
{
WND* wndPtr = WIN_FindWndPtr( hwnd );
- BOOL wasVisible;
+ BOOL wasVisible, showFlag;
RECT newPos = {0, 0, 0, 0};
UINT swp = 0;
@@ -1342,6 +1332,13 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT c
swp |= WINPOS_MinMaximize( hwnd, SW_RESTORE, &newPos );
else swp |= SWP_NOSIZE | SWP_NOMOVE;
break;
+ }
+
+ showFlag = (cmd != SW_HIDE);
+ if (showFlag != wasVisible)
+ {
+ SendMessageW( hwnd, WM_SHOWWINDOW, showFlag, 0 );
+ if (!IsWindow( hwnd )) goto END;
}
/* We can't activate a child window */
More information about the wine-patches
mailing list