Force a redraw if the window focus changes.
Otherwise if all of the windows in the new situation never redraw we never update to show the new focus configuration. This change avoids things like stuck overlays and notification windows if the underlying game is stuck.
This commit is contained in:
parent
26aeebf11d
commit
7796ffc130
1 changed files with 10 additions and 0 deletions
|
@ -1597,6 +1597,8 @@ determine_and_apply_focus(Display *dpy, MouseCursor *cursor)
|
|||
gameFocused = false;
|
||||
|
||||
Window prevFocusWindow = currentFocusWindow;
|
||||
Window prevOverlayWindow = currentOverlayWindow;
|
||||
Window prevNotificationWindow = currentNotificationWindow;
|
||||
currentFocusWindow = None;
|
||||
currentFocusWin = nullptr;
|
||||
currentOverlayWindow = None;
|
||||
|
@ -1637,6 +1639,12 @@ determine_and_apply_focus(Display *dpy, MouseCursor *cursor)
|
|||
}
|
||||
}
|
||||
|
||||
if ( prevOverlayWindow != currentOverlayWindow ||
|
||||
prevNotificationWindow != currentNotificationWindow )
|
||||
{
|
||||
hasRepaint = true;
|
||||
}
|
||||
|
||||
std::vector< unsigned long > focusable_appids;
|
||||
std::vector< unsigned long > focusable_windows;
|
||||
|
||||
|
@ -1781,6 +1789,8 @@ found:
|
|||
PropModeReplace, (unsigned char *)wmState,
|
||||
sizeof(wmState) / sizeof(wmState[0]));
|
||||
|
||||
hasRepaint = true;
|
||||
|
||||
gpuvis_trace_printf( "determine_and_apply_focus focus %lu", focus->id );
|
||||
|
||||
if ( debugFocus == true )
|
||||
|
|
Loading…
Reference in a new issue