From a2ec669793c076056816174cefaf143c537dff70 Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Sun, 5 Aug 2018 00:36:46 +0200 Subject: [PATCH] use SetWindowPos rather than ShowWindow trick in WM_AUTORENDER (Works better on WINE) --- src/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index a295832..f12d98c 100644 --- a/src/main.c +++ b/src/main.c @@ -623,8 +623,10 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_AUTORENDERER: { mouse_unlock(); - ShowWindow(ddraw->hWnd, SW_MINIMIZE); - ShowWindow(ddraw->hWnd, SW_RESTORE); + SetWindowPos(ddraw->hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + SetWindowPos(ddraw->hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + //ShowWindow(ddraw->hWnd, SW_MINIMIZE); + //ShowWindow(ddraw->hWnd, SW_RESTORE); mouse_lock(); return 0; }