Commit 92faf7aa authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32: Make more ShowWindow tests pass under Wine.

parent ebd57713
...@@ -8547,7 +8547,7 @@ static void test_ShowWindow(void) ...@@ -8547,7 +8547,7 @@ static void test_ShowWindow(void)
} sw[] = } sw[] =
{ {
/* 1 */ { SW_SHOWNORMAL, FALSE, WS_VISIBLE, WmShowNormal, TRUE }, /* 1 */ { SW_SHOWNORMAL, FALSE, WS_VISIBLE, WmShowNormal, TRUE },
/* 2 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmEmptySeq, TRUE }, /* 2 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmEmptySeq, FALSE },
/* 3 */ { SW_HIDE, TRUE, 0, WmHide_1, FALSE }, /* 3 */ { SW_HIDE, TRUE, 0, WmHide_1, FALSE },
/* 4 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE }, /* 4 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE },
/* 5 */ { SW_SHOWMINIMIZED, FALSE, WS_VISIBLE|WS_MINIMIZE, WmShowMinimized_1, FALSE }, /* 5 */ { SW_SHOWMINIMIZED, FALSE, WS_VISIBLE|WS_MINIMIZE, WmShowMinimized_1, FALSE },
...@@ -8559,7 +8559,7 @@ static void test_ShowWindow(void) ...@@ -8559,7 +8559,7 @@ static void test_ShowWindow(void)
/* 11 */ { SW_HIDE, TRUE, WS_MAXIMIZE, WmHide_1, FALSE }, /* 11 */ { SW_HIDE, TRUE, WS_MAXIMIZE, WmHide_1, FALSE },
/* 12 */ { SW_HIDE, FALSE, WS_MAXIMIZE, WmEmptySeq, FALSE }, /* 12 */ { SW_HIDE, FALSE, WS_MAXIMIZE, WmEmptySeq, FALSE },
/* 13 */ { SW_SHOWNOACTIVATE, FALSE, WS_VISIBLE, WmShowNoActivate_1, FALSE }, /* 13 */ { SW_SHOWNOACTIVATE, FALSE, WS_VISIBLE, WmShowNoActivate_1, FALSE },
/* 14 */ { SW_SHOWNOACTIVATE, TRUE, WS_VISIBLE, WmEmptySeq, TRUE }, /* 14 */ { SW_SHOWNOACTIVATE, TRUE, WS_VISIBLE, WmEmptySeq, FALSE },
/* 15 */ { SW_HIDE, TRUE, 0, WmHide_2, FALSE }, /* 15 */ { SW_HIDE, TRUE, 0, WmHide_2, FALSE },
/* 16 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE }, /* 16 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE },
/* 17 */ { SW_SHOW, FALSE, WS_VISIBLE, WmShow, FALSE }, /* 17 */ { SW_SHOW, FALSE, WS_VISIBLE, WmShow, FALSE },
...@@ -8576,15 +8576,15 @@ static void test_ShowWindow(void) ...@@ -8576,15 +8576,15 @@ static void test_ShowWindow(void)
/* 28 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_2, FALSE }, /* 28 */ { SW_HIDE, TRUE, WS_MINIMIZE, WmHide_2, FALSE },
/* 29 */ { SW_HIDE, FALSE, WS_MINIMIZE, WmEmptySeq, FALSE }, /* 29 */ { SW_HIDE, FALSE, WS_MINIMIZE, WmEmptySeq, FALSE },
/* 30 */ { SW_RESTORE, FALSE, WS_VISIBLE, WmRestore_1, FALSE }, /* 30 */ { SW_RESTORE, FALSE, WS_VISIBLE, WmRestore_1, FALSE },
/* 31 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmEmptySeq, TRUE }, /* 31 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmEmptySeq, FALSE },
/* 32 */ { SW_HIDE, TRUE, 0, WmHide_3, TRUE }, /* 32 */ { SW_HIDE, TRUE, 0, WmHide_3, TRUE },
/* 33 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE }, /* 33 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE },
/* 34 */ { SW_NORMALNA, FALSE, 0, WmEmptySeq, TRUE }, /* what does this mean?! */ /* 34 */ { SW_NORMALNA, FALSE, 0, WmEmptySeq, TRUE }, /* what does this mean?! */
/* 35 */ { SW_NORMALNA, FALSE, 0, WmEmptySeq, TRUE }, /* 35 */ { SW_NORMALNA, FALSE, 0, WmEmptySeq, TRUE },
/* 36 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE }, /* 36 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE },
/* 37 */ { SW_RESTORE, FALSE, WS_VISIBLE, WmRestore_2, TRUE }, /* 37 */ { SW_RESTORE, FALSE, WS_VISIBLE, WmRestore_2, FALSE },
/* 38 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmEmptySeq, TRUE }, /* 38 */ { SW_RESTORE, TRUE, WS_VISIBLE, WmEmptySeq, FALSE },
/* 39 */ { SW_SHOWNOACTIVATE, TRUE, WS_VISIBLE, WmEmptySeq, TRUE }, /* 39 */ { SW_SHOWNOACTIVATE, TRUE, WS_VISIBLE, WmEmptySeq, FALSE },
/* 40 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_2, TRUE }, /* 40 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_2, TRUE },
/* 41 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_3, FALSE }, /* 41 */ { SW_MINIMIZE, TRUE, WS_VISIBLE|WS_MINIMIZE, WmMinMax_3, FALSE },
/* 42 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_2, TRUE }, /* 42 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_2, TRUE },
...@@ -8596,7 +8596,7 @@ static void test_ShowWindow(void) ...@@ -8596,7 +8596,7 @@ static void test_ShowWindow(void)
/* 48 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_3, FALSE }, /* 48 */ { SW_SHOWMAXIMIZED, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmShowMaximized_3, FALSE },
/* 49 */ { SW_SHOW, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmEmptySeq, FALSE }, /* 49 */ { SW_SHOW, TRUE, WS_VISIBLE|WS_MAXIMIZE, WmEmptySeq, FALSE },
/* 50 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmRestore_5, FALSE }, /* 50 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmRestore_5, FALSE },
/* 51 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmEmptySeq, TRUE }, /* 51 */ { SW_SHOWNORMAL, TRUE, WS_VISIBLE, WmEmptySeq, FALSE },
/* 52 */ { SW_HIDE, TRUE, 0, WmHide_1, FALSE }, /* 52 */ { SW_HIDE, TRUE, 0, WmHide_1, FALSE },
/* 53 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE }, /* 53 */ { SW_HIDE, FALSE, 0, WmEmptySeq, FALSE },
/* 54 */ { SW_MINIMIZE, FALSE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_3, TRUE }, /* 54 */ { SW_MINIMIZE, FALSE, WS_VISIBLE|WS_MINIMIZE, WmMinimize_3, TRUE },
......
...@@ -618,8 +618,6 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd ) ...@@ -618,8 +618,6 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
swp |= SWP_NOACTIVATE | SWP_NOZORDER; swp |= SWP_NOACTIVATE | SWP_NOZORDER;
/* fall through */ /* fall through */
case SW_RESTORE: case SW_RESTORE:
swp |= SWP_FRAMECHANGED;
if (!wasVisible) swp |= SWP_SHOWWINDOW;
/* fall through */ /* fall through */
case SW_SHOWNORMAL: /* same as SW_NORMAL: */ case SW_SHOWNORMAL: /* same as SW_NORMAL: */
case SW_SHOWDEFAULT: /* FIXME: should have its own handler */ case SW_SHOWDEFAULT: /* FIXME: should have its own handler */
...@@ -631,6 +629,7 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd ) ...@@ -631,6 +629,7 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
} }
else else
{ {
if (wasVisible) return TRUE;
swp |= SWP_NOSIZE | SWP_NOMOVE; swp |= SWP_NOSIZE | SWP_NOMOVE;
} }
if (style & WS_CHILD && !(swp & SWP_STATECHANGED)) swp |= SWP_NOACTIVATE | SWP_NOZORDER; if (style & WS_CHILD && !(swp & SWP_STATECHANGED)) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment