Only child windows receive WM_SHOWWINDOW in DestroyWindow() under Windows
dmitry at baikal.ru
Mon May 10 04:28:29 CDT 2004
"Alexandre Julliard" <julliard at winehq.org> wrote:
> It's not merged properly, you now have two ShowWindow calls, and
Sorry about that.
> WINPOS_ActivateOtherWindow will never be called.
Since now ShowWindow is called only for child windows and it's a job of
a Window Manager to activate top level windows, is WINPOS_ActivateOtherWindow
call still needed? If yes, perhaps it should become a part of SetWindowPos.
Here is a patch merged with current CVS.
Dmitry Timoshkov <dmitry at codeweavers.com>
Only child windows receive WM_SHOWWINDOW in DestroyWindow() under Windows.
--- cvs/hq/wine/windows/win.c 2004-04-03 12:30:57.000000000 +0900
+++ wine/windows/win.c 2004-05-10 17:33:33.000000000 +0900
@@ -1505,10 +1505,15 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
/* Hide the window */
- if (!ShowWindow( hwnd, SW_HIDE ))
- if (hwnd == GetActiveWindow()) WINPOS_ActivateOtherWindow( hwnd );
+ /* Only child windows receive WM_SHOWWINDOW in DestroyWindow()
+ * under Windows
+ if (is_child)
+ ShowWindow( hwnd, SW_HIDE );
+ SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE |
+ SWP_NOZORDER | SWP_HIDEWINDOW );
if (!IsWindow(hwnd)) return TRUE;
/* Recursively destroy owned windows */
More information about the wine-patches