=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: ddraw: Update the focus window after recreating the swapchain.
Alexandre Julliard
julliard at winehq.org
Thu Jun 6 13:46:00 CDT 2013
Module: wine
Branch: master
Commit: 6560135c64550343be95a83532cad78aa5787f5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6560135c64550343be95a83532cad78aa5787f5a
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Wed Jun 5 10:55:39 2013 +0200
ddraw: Update the focus window after recreating the swapchain.
---
dlls/ddraw/ddraw.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index afb95c9..d285589 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -814,10 +814,6 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo
This->focuswindow = NULL;
}
- if ((This->cooperative_level & DDSCL_EXCLUSIVE)
- && (window != This->dest_window || !(cooplevel & DDSCL_EXCLUSIVE)))
- wined3d_device_release_focus_window(This->wined3d_device);
-
if ((cooplevel & DDSCL_FULLSCREEN) != (This->cooperative_level & DDSCL_FULLSCREEN) || window != This->dest_window)
{
if (This->cooperative_level & DDSCL_FULLSCREEN)
@@ -833,18 +829,6 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo
}
}
- if ((cooplevel & DDSCL_EXCLUSIVE)
- && (window != This->dest_window || !(This->cooperative_level & DDSCL_EXCLUSIVE)))
- {
- hr = wined3d_device_acquire_focus_window(This->wined3d_device, window);
- if (FAILED(hr))
- {
- ERR("Failed to acquire focus window, hr %#x.\n", hr);
- wined3d_mutex_unlock();
- return hr;
- }
- }
-
if (cooplevel & DDSCL_MULTITHREADED && !(This->cooperative_level & DDSCL_MULTITHREADED))
wined3d_device_set_multithreaded(This->wined3d_device);
@@ -896,6 +880,22 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND windo
wined3d_stateblock_decref(stateblock);
}
+ if ((This->cooperative_level & DDSCL_EXCLUSIVE)
+ && (window != This->dest_window || !(cooplevel & DDSCL_EXCLUSIVE)))
+ wined3d_device_release_focus_window(This->wined3d_device);
+
+ if ((cooplevel & DDSCL_EXCLUSIVE)
+ && (window != This->dest_window || !(This->cooperative_level & DDSCL_EXCLUSIVE)))
+ {
+ hr = wined3d_device_acquire_focus_window(This->wined3d_device, window);
+ if (FAILED(hr))
+ {
+ ERR("Failed to acquire focus window, hr %#x.\n", hr);
+ wined3d_mutex_unlock();
+ return hr;
+ }
+ }
+
/* Unhandled flags */
if(cooplevel & DDSCL_ALLOWREBOOT)
WARN("(%p) Unhandled flag DDSCL_ALLOWREBOOT, harmless\n", This);
More information about the wine-cvs
mailing list