Module: wine Branch: master Commit: 4e2d25c7cd22ae4c7ea1be9126c1f7183ebcd722 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e2d25c7cd22ae4c7ea1be9126...
Author: Stefan Dösinger stefan@codeweavers.com Date: Fri Oct 30 19:33:11 2015 +0100
comctl32: Re-enable the parent before destroying the dialog.
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 stefan@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 ce7001c..ed5f7d4 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; }