wined3d: Don't show the window if no window changes were requested.

Based on a patch by Rémi Bernon.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Gabriel Ivăncescu 2020-07-07 23:43:13 +04:30 committed by Alexandre Julliard
parent 7c0e2a0ca6
commit e041ff1f91
3 changed files with 7 additions and 6 deletions

View File

@ -3569,7 +3569,7 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE);
expected_style = device_style;
todo_wine_if (!(tests[i].style_flags & WS_VISIBLE))
todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES))
ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
expected_style, style, i);
style = GetWindowLongA(device_window, GWL_EXSTYLE);
@ -3590,7 +3590,7 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE);
expected_style = device_style;
todo_wine_if (!(tests[i].style_flags & WS_VISIBLE))
todo_wine_if (!(tests[i].style_flags & WS_VISIBLE) && !(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES))
ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
expected_style, style, i);
style = GetWindowLongA(device_window, GWL_EXSTYLE);

View File

@ -5020,9 +5020,8 @@ static void test_window_style(void)
style = GetWindowLongA(device_window, GWL_STYLE);
expected_style = device_style | tests[i].style;
todo_wine_if ((tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) && !(tests[i].create_style & WS_VISIBLE))
ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
expected_style, style, i);
ok(style == expected_style, "Expected device window style %#x, got %#x, i=%u.\n",
expected_style, style, i);
style = GetWindowLongA(device_window, GWL_EXSTYLE);
expected_style = device_exstyle | tests[i].exstyle;
todo_wine_if (!(tests[i].device_flags & CREATE_DEVICE_NOWINDOWCHANGES) && (tests[i].create_style & WS_VISIBLE))

View File

@ -2065,7 +2065,7 @@ static LONG fullscreen_exstyle(LONG exstyle)
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state,
HWND window, int x, int y, int width, int height)
{
unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE;
unsigned int window_pos_flags = SWP_FRAMECHANGED | SWP_NOACTIVATE;
LONG style, exstyle;
BOOL filter;
@ -2085,6 +2085,8 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state
if (state->desc.flags & WINED3D_SWAPCHAIN_NO_WINDOW_CHANGES)
window_pos_flags |= SWP_NOZORDER;
else
window_pos_flags |= SWP_SHOWWINDOW;
state->style = GetWindowLongW(window, GWL_STYLE);
state->exstyle = GetWindowLongW(window, GWL_EXSTYLE);