Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dxgi/tests/dxgi.c | 4 ++-- dlls/wined3d/swapchain.c | 22 ++-------------------- 2 files changed, 4 insertions(+), 22 deletions(-)
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index d0d521f069c..44666515d19 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -5403,7 +5403,7 @@ static void test_swapchain_window_styles(void) { style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - todo_wine + todo_wine_if(!(tests[i].expected_style & WS_VISIBLE)) ok(style == fullscreen_style, "Test %u: Got style %#x, expected %#x.\n", i, style, fullscreen_style); ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", @@ -5434,7 +5434,7 @@ static void test_swapchain_window_styles(void) { style = GetWindowLongA(swapchain_desc.OutputWindow, GWL_STYLE); exstyle = GetWindowLongA(swapchain_desc.OutputWindow, GWL_EXSTYLE); - todo_wine + todo_wine_if(!(tests[i].expected_style & WS_VISIBLE)) ok(style == fullscreen_style, "Test %u: Got style %#x, expected %#x.\n", i, style, fullscreen_style); ok(exstyle == fullscreen_exstyle, "Test %u: Got exstyle %#x, expected %#x.\n", diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index ad91f506cc1..49f30792a7a 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -1524,28 +1524,10 @@ HRESULT CDECL wined3d_swapchain_state_resize_target(struct wined3d_swapchain_sta return WINED3D_OK; }
-static LONG fullscreen_style(LONG style) -{ - /* Make sure the window is managed, otherwise we won't get keyboard input. */ - style |= WS_POPUP | WS_SYSMENU; - style &= ~(WS_CAPTION | WS_THICKFRAME); - - return style; -} - -static LONG fullscreen_exstyle(LONG exstyle) -{ - /* Filter out window decorations. */ - exstyle &= ~(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE); - - return exstyle; -} - HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, HWND window, unsigned int w, unsigned int h) { unsigned int window_pos_flags = SWP_SHOWWINDOW | SWP_NOACTIVATE; - LONG style, exstyle; BOOL filter;
TRACE("Setting up window %p for fullscreen mode.\n", window); @@ -1569,8 +1551,8 @@ HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state
if (!(state->desc.flags & WINED3D_SWAPCHAIN_NO_STYLE_CHANGES)) { - style = fullscreen_style(state->style); - exstyle = fullscreen_exstyle(state->exstyle); + LONG style = state->style & ~(WS_POPUP | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_THICKFRAME | WS_SYSMENU | WS_DLGFRAME | WS_BORDER); + LONG exstyle = state->exstyle & ~(WS_EX_DLGMODALFRAME | WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE | WS_EX_CONTEXTHELP);
TRACE("Old style was %08x, %08x, setting to %08x, %08x.\n", state->style, state->exstyle, style, exstyle);