Skip to content
Snippets Groups Projects
Commit 22b0bdaa authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

When SyncTERM is deactivated and it is in fullscreen mode, minimize.

This appears to be the best we can do when Windows+M (minimize all)
is pressed.  We don't seem to be notified that we should minimize,
only that a different application is being activated.

This also makes Alt-TAB behave a bit more like expected.
parent 6fc2a6b6
No related branches found
No related tags found
No related merge requests found
......@@ -683,6 +683,22 @@ gdi_handle_getdpiscaledsize(WORD dpi, LPSIZE sz)
return TRUE;
}
static LRESULT
gdi_handle_wm_activateapp(WPARAM wParam, LPARAM lParam)
{
int w, h;
if (wParam == FALSE) {
if (fullscreen) {
// Minimize when we lose focus in fullscreen
// Fixes interaction with Windows+M, and makes
// Alt-TAB less shitty.
ShowWindow(win, SW_MINIMIZE);
}
}
return 0;
}
static LRESULT CALLBACK
gdi_handle_wm_dpichanged(WPARAM wParam, RECT *r)
{
......@@ -718,6 +734,8 @@ gdi_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
return 0;
case WM_SIZE:
return gdi_handle_wm_size(wParam, lParam);
case WM_ACTIVATEAPP:
return gdi_handle_wm_activateapp(wParam, lParam);
case WM_SIZING:
return gdi_handle_wm_sizing(wParam, (RECT *)lParam);
case WM_CLOSE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment