Exit full screen mode if changing window

with alt-tab etc. unintended way.
This commit is contained in:
ts-korhonen
2022-01-12 19:39:17 +02:00
parent c359c3caef
commit b13c14b039
2 changed files with 24 additions and 0 deletions

View File

@@ -961,6 +961,9 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_WINDOWPOSCHANGED:
if (video_fullscreen & 1)
PostMessage(hwndMain, WM_LEAVEFULLSCREEN, 0, 0);
pos = (WINDOWPOS*)lParam;
GetClientRect(hwndMain, &rect);
@@ -1160,6 +1163,13 @@ MainWindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
}
break;
case WM_ACTIVATEAPP:
/* Leave full screen on switching application except
for OpenGL Core and VNC renderers. */
if (video_fullscreen & 1 && wParam == FALSE && vid_api < 3)
PostMessage(hwndMain, WM_LEAVEFULLSCREEN, 0, 0);
break;
case WM_ENTERSIZEMOVE:
user_resize = 1;
break;