Commit f2616c56 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

Only child windows receive WM_SHOWWINDOW in DestroyWindow() under

Windows.
parent 447e6477
...@@ -1429,6 +1429,7 @@ static void WIN_SendDestroyMsg( HWND hwnd ) ...@@ -1429,6 +1429,7 @@ static void WIN_SendDestroyMsg( HWND hwnd )
if (GetGUIThreadInfo( GetCurrentThreadId(), &info )) if (GetGUIThreadInfo( GetCurrentThreadId(), &info ))
{ {
if (hwnd == info.hwndCaret) DestroyCaret(); if (hwnd == info.hwndCaret) DestroyCaret();
if (hwnd == info.hwndActive) WINPOS_ActivateOtherWindow( hwnd );
} }
if (USER_Driver.pResetSelectionOwner) if (USER_Driver.pResetSelectionOwner)
USER_Driver.pResetSelectionOwner( hwnd, TRUE ); USER_Driver.pResetSelectionOwner( hwnd, TRUE );
...@@ -1505,10 +1506,13 @@ BOOL WINAPI DestroyWindow( HWND hwnd ) ...@@ -1505,10 +1506,13 @@ BOOL WINAPI DestroyWindow( HWND hwnd )
/* Hide the window */ /* Hide the window */
if (!ShowWindow( hwnd, SW_HIDE )) /* Only child windows receive WM_SHOWWINDOW in DestroyWindow() */
{ if (is_child)
if (hwnd == GetActiveWindow()) WINPOS_ActivateOtherWindow( hwnd ); ShowWindow( hwnd, SW_HIDE );
} else
SetWindowPos( hwnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE |
SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW );
if (!IsWindow(hwnd)) return TRUE; if (!IsWindow(hwnd)) return TRUE;
/* Recursively destroy owned windows */ /* Recursively destroy owned windows */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment