From: Zebediah Figura zfigura@codeweavers.com
Fixes: a2c03e23565779d2743f5750c37de0be3f7222bf --- dlls/wined3d/swapchain.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 4b420a749f3..346fd1e6497 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -2200,8 +2200,6 @@ static DWORD WINAPI set_window_state_thread(void *ctx) struct wined3d_window_state *s = ctx; bool filter;
- SetThreadDescription(GetCurrentThread(), L"wined3d_set_window_state"); - filter = wined3d_filter_messages(s->window, TRUE);
if (s->set_style) @@ -2229,11 +2227,18 @@ static void set_window_state(struct wined3d_window_state *s) * position can potentially deadlock if that thread isn't processing * messages. */ if (window_tid == tid) + { set_window_state_thread(s); - else if (!(thread = CreateThread(NULL, 0, set_window_state_thread, s, 0, NULL))) - ERR("Failed to create thread.\n"); - else + } + else if ((thread = CreateThread(NULL, 0, set_window_state_thread, s, 0, NULL))) + { + SetThreadDescription(thread, L"wined3d_set_window_state"); CloseHandle(thread); + } + else + { + ERR("Failed to create thread.\n"); + } }
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state,