[PATCH] comctl32: Re-enable the parent before destroying the dialog.
Stefan Dösinger
stefan at codeweavers.com
Fri Oct 30 13:33:11 CDT 2015
This prevents 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 at codeweavers.com>
---
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;
}
--
2.4.10
More information about the wine-patches
mailing list