focus: Keep focus when un-fullscreened

With pointer focus modes, when un-fullscreening a focused window, focus
was lost if the pointer landed in another window.

#5
This commit is contained in:
Kim Woelders 2022-12-09 15:54:22 +01:00
parent a90ac65bd7
commit ee2da6a545
1 changed files with 4 additions and 0 deletions

View File

@ -1307,6 +1307,10 @@ EwinOpFullscreen(EWin * ewin, int source __UNUSED__, int on)
EwinStateUpdate(ewin);
EwinRaise(ewin);
EwinMoveResize(ewin, x, y, w, h, MRF_KEEP_MAXIMIZED);
/* Keep focus if focused */
if (ewin->state.active)
FocusToEWin(ewin, FOCUS_SET);
}
HintsSetWindowState(ewin);