From 4e2d25c7cd22ae4c7ea1be9126c1f7183ebcd722 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20D=C3=B6singer?= Date: Fri, 30 Oct 2015 19:33:11 +0100 Subject: [PATCH] comctl32: Re-enable the parent before destroying the dialog. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Prevent 1602 AD from minimizing when the multiplayer dialog is closed. When DestroyWindow is called, user32 tries to find a window to activate, finds the main game window disabled and decides to go to the desktop. Wined3d will help this process by minimizing the game out of the way. Signed-off-by: Stefan Dösinger Signed-off-by: Alexandre Julliard --- dlls/comctl32/propsheet.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index ce7001c4b41..ed5f7d49c62 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -2706,6 +2706,7 @@ static INT do_loop(const PropSheetInfo *psInfo) MSG msg; INT ret = -1; HWND hwnd = psInfo->hwnd; + HWND parent = psInfo->ppshheader.hwndParent; while(IsWindow(hwnd) && !psInfo->ended && (ret = GetMessageW(&msg, NULL, 0, 0))) { @@ -2728,6 +2729,9 @@ static INT do_loop(const PropSheetInfo *psInfo) if(ret != -1) ret = psInfo->result; + if(parent) + EnableWindow(parent, TRUE); + DestroyWindow(hwnd); return ret; } @@ -2754,10 +2758,7 @@ static INT_PTR PROPSHEET_PropertySheet(PropSheetInfo* psInfo, BOOL unicode) } bRet = PROPSHEET_CreateDialog(psInfo); if(!psInfo->isModeless) - { bRet = do_loop(psInfo); - if (parent) EnableWindow(parent, TRUE); - } return bRet; } -- 2.11.4.GIT