[PATCH v2] user32: should restore owned window when restoring owner window.

Jiang Biao jiang.biao2 at zte.com.cn
Fri Jul 14 04:36:03 CDT 2017


According to the description in MSDN, owned window should be
restored when restoring the owner window. In current flow, if a
Windows app directly uses ShowWindow to restore a owner window,
its owned window will not be restored. In that case, for some apps
(such as EDiary), their owned windows could not be restored after
being minimized.

Signed-off-by: Jiang Biao <jiang.biao2 at zte.com.cn>
Signed-off-by: Shi ZhongBing <shi.zhongbing at zte.com.cn>
---

Resend because the last patch is not correct. Sorry about that.

Signed-off-by: Jiang Biao <jiang.biao2 at zte.com.cn>
---
 dlls/user32/winpos.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/user32/winpos.c b/dlls/user32/winpos.c
index a9f3d9e..7a55f8f 100644
--- a/dlls/user32/winpos.c
+++ b/dlls/user32/winpos.c
@@ -1100,6 +1100,8 @@ static BOOL show_window( HWND hwnd, INT cmd )
             swp |= SWP_NOACTIVATE | SWP_NOZORDER;
             /* fall through */
 	case SW_RESTORE:
+            if (hwnd == GetActiveWindow())
+                ShowOwnedPopups(hwnd, TRUE);
             /* fall through */
 	case SW_SHOWNORMAL:  /* same as SW_NORMAL: */
 	case SW_SHOWDEFAULT: /* FIXME: should have its own handler */
-- 
2.7.4





More information about the wine-patches mailing list