Sam Edwards : wined3d: Ignore WS_VISIBLE and WS_EX_TOPMOST when dropping out of fullscreen.

Alexandre Julliard julliard at winehq.org
Wed Apr 3 14:33:55 CDT 2013


Module: wine
Branch: master
Commit: 6c43f90c50cb1c231beb4add3dcf869c83389b5f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6c43f90c50cb1c231beb4add3dcf869c83389b5f

Author: Sam Edwards <CFSworks at gmail.com>
Date:   Sun Mar 31 18:25:27 2013 -0600

wined3d: Ignore WS_VISIBLE and WS_EX_TOPMOST when dropping out of fullscreen.

---

 dlls/wined3d/device.c |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index bca5a54..e4b970c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1044,12 +1044,21 @@ void CDECL wined3d_device_restore_fullscreen_window(struct wined3d_device *devic
 
     if (!device->style && !device->exStyle) return;
 
-    TRACE("Restoring window style of window %p to %08x, %08x.\n",
-            window, device->style, device->exStyle);
-
     style = GetWindowLongW(window, GWL_STYLE);
     exstyle = GetWindowLongW(window, GWL_EXSTYLE);
 
+    /* These flags are set by wined3d_device_setup_fullscreen_window, not the
+     * application, and we want to ignore them in the test below, since it's
+     * not the application's fault that they changed. Additionally, we want to
+     * preserve the current status of these flags (i.e. don't restore them) to
+     * more closely emulate the behavior of Direct3D, which leaves these flags
+     * alone when returning to windowed mode. */
+    device->style ^= (device->style ^ style) & WS_VISIBLE;
+    device->exStyle ^= (device->exStyle ^ exstyle) & WS_EX_TOPMOST;
+
+    TRACE("Restoring window style of window %p to %08x, %08x.\n",
+            window, device->style, device->exStyle);
+
     filter_messages = device->filter_messages;
     device->filter_messages = TRUE;
 




More information about the wine-cvs mailing list