wined3d: Do not play with WS_VISIBLE, this causes unwanted mapping/unmaping of the window

Dmitry Timoshkov dmitry at codeweavers.com
Sun Jan 14 06:16:42 CST 2007


Hello,

Changelog:
    wined3d: Do not play with WS_VISIBLE, this causes unwanted mapping/unmaping of the window.

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 8a02e31..b7c0311 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1438,6 +1438,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
         HDC      hdc;
         int      bpp = 0;
         RECT     clip_rc;
+        DWORD    style;
 
         /* Get info on the current display setup */
         hdc = GetDC(0);
@@ -1453,11 +1454,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
         MultiByteToWideChar(CP_ACP, 0, "Gamers CG", -1, devmode.dmDeviceName, CCHDEVICENAME);
         ChangeDisplaySettingsExW(devmode.dmDeviceName, &devmode, object->win_handle, CDS_FULLSCREEN, NULL);
 
-        /* Make popup window */
-        SetWindowLongA(object->win_handle, GWL_STYLE, WS_POPUP);
+        /* Make popup window, remove caption and borders */
+        style = GetWindowLongW(object->win_handle, GWL_STYLE);
+        style &= ~WS_CAPTION;
+        SetWindowLongW(object->win_handle, GWL_STYLE, style | WS_POPUP);
         SetWindowPos(object->win_handle, HWND_TOP, 0, 0,
                      *(pPresentationParameters->BackBufferWidth),
-                     *(pPresentationParameters->BackBufferHeight), SWP_SHOWWINDOW | SWP_FRAMECHANGED);
+                     *(pPresentationParameters->BackBufferHeight), SWP_FRAMECHANGED);
 
         /* For GetDisplayMode */
         This->ddraw_width = devmode.dmPelsWidth;
-- 
1.4.4.4






More information about the wine-patches mailing list