Commit e2e0c747 authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

wined3d: Filter messages for fullscreen mode changes.

This fixes a regression introduced by commit d9f8cba5. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 37daa357
......@@ -4310,7 +4310,7 @@ static void test_reset_fullscreen(void)
ok(SUCCEEDED(reset_device(device, &device_desc)), "Failed to reset device.\n");
flush_events();
todo_wine ok(!wm_size_received, "Received unexpected WM_SIZE message.\n");
ok(!wm_size_received, "Received unexpected WM_SIZE message.\n");
cleanup:
if (device) IDirect3DDevice9_Release(device);
......
......@@ -1525,6 +1525,7 @@ HRESULT CDECL wined3d_swapchain_set_fullscreen(struct wined3d_swapchain *swapcha
if (swapchain->desc.windowed)
{
/* Switch from windowed to fullscreen */
HWND focus_window = device->create_parms.focus_window;
if (!focus_window)
focus_window = swapchain->device_window;
......@@ -1534,20 +1535,24 @@ HRESULT CDECL wined3d_swapchain_set_fullscreen(struct wined3d_swapchain *swapcha
return hr;
}
/* switch from windowed to fs */
wined3d_device_setup_fullscreen_window(device, swapchain->device_window, width, height);
}
else
{
/* Fullscreen -> fullscreen mode change */
BOOL filter_messages = device->filter_messages;
device->filter_messages = TRUE;
MoveWindow(swapchain->device_window, 0, 0, width, height, TRUE);
device->filter_messages = filter_messages;
}
swapchain->d3d_mode = actual_mode;
}
else if (!swapchain->desc.windowed)
{
RECT *window_rect = NULL;
/* Fullscreen -> windowed switch */
RECT *window_rect = NULL;
if (swapchain->desc.flags & WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT)
window_rect = &swapchain->original_window_rect;
wined3d_device_restore_fullscreen_window(device, swapchain->device_window, window_rect);
......
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