Activate another window when the dialog gets hidden in EndDialog.
diff --git a/windows/dialog.c b/windows/dialog.c
index 06bb82c..e567222 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -38,6 +38,7 @@
#include "wine/unicode.h"
#include "controls.h"
#include "win.h"
+#include "winpos.h"
#include "user.h"
#include "wine/debug.h"
@@ -898,6 +899,8 @@
SetWindowPos(hwnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE
| SWP_NOZORDER | SWP_NOACTIVATE | SWP_HIDEWINDOW);
+ if (hwnd == GetActiveWindow()) WINPOS_ActivateOtherWindow( hwnd );
+
/* unblock dialog loop */
PostMessageA(hwnd, WM_NULL, 0, 0);
return TRUE;