diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index 7a3f1ff95e9..9df40abc70c 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -135,6 +135,8 @@ void * CDECL wined3d_swapchain_get_parent(const struct wined3d_swapchain *swapch void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window) { + struct wined3d_device *device = swapchain->device; + if (!window) window = swapchain->device_window; if (window == swapchain->win_handle) @@ -142,6 +144,9 @@ void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWN TRACE("Setting swapchain %p window from %p to %p.\n", swapchain, swapchain->win_handle, window); + + device->cs->ops->finish(device->cs, WINED3D_CS_QUEUE_DEFAULT); + swapchain->win_handle = window; }