From 6c05064e8d6d37f1f70e3c5925e3c19e32f23184 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 12 Aug 2018 13:12:04 +0200 Subject: [PATCH] Add WS_MINIMIZEBOX in fullscreen mode too (Fixes alt+tab on Ubuntu 16.04) --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.c b/src/main.c index 7af13b9..7424344 100644 --- a/src/main.c +++ b/src/main.c @@ -411,6 +411,9 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD if (!This->border) { SetWindowLong(This->hWnd, GWL_STYLE, GetWindowLong(This->hWnd, GWL_STYLE) & ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU)); + + if (ddraw->wine) + SetWindowLong(This->hWnd, GWL_STYLE, GetWindowLong(This->hWnd, GWL_STYLE) | WS_MINIMIZEBOX); } else { @@ -435,6 +438,9 @@ HRESULT __stdcall ddraw_SetDisplayMode(IDirectDrawImpl *This, DWORD width, DWORD return DDERR_INVALIDMODE; } + if (ddraw->wine) + SetWindowLong(This->hWnd, GWL_STYLE, GetWindowLong(This->hWnd, GWL_STYLE) | WS_MINIMIZEBOX); + SetWindowPos(This->hWnd, HWND_TOPMOST, 0, 0, This->render.width, This->render.height, SWP_SHOWWINDOW); mouse_lock();