Skip to content

Commit 7796ffc

Browse files
BNieuwenhuizenemersion
authored andcommitted
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.
1 parent 26aeebf commit 7796ffc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/steamcompmgr.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -1597,6 +1597,8 @@ determine_and_apply_focus(Display *dpy, MouseCursor *cursor)
15971597
gameFocused = false;
15981598

15991599
Window prevFocusWindow = currentFocusWindow;
1600+
Window prevOverlayWindow = currentOverlayWindow;
1601+
Window prevNotificationWindow = currentNotificationWindow;
16001602
currentFocusWindow = None;
16011603
currentFocusWin = nullptr;
16021604
currentOverlayWindow = None;
@@ -1637,6 +1639,12 @@ determine_and_apply_focus(Display *dpy, MouseCursor *cursor)
16371639
}
16381640
}
16391641

1642+
if ( prevOverlayWindow != currentOverlayWindow ||
1643+
prevNotificationWindow != currentNotificationWindow )
1644+
{
1645+
hasRepaint = true;
1646+
}
1647+
16401648
std::vector< unsigned long > focusable_appids;
16411649
std::vector< unsigned long > focusable_windows;
16421650

@@ -1781,6 +1789,8 @@ determine_and_apply_focus(Display *dpy, MouseCursor *cursor)
17811789
PropModeReplace, (unsigned char *)wmState,
17821790
sizeof(wmState) / sizeof(wmState[0]));
17831791

1792+
hasRepaint = true;
1793+
17841794
gpuvis_trace_printf( "determine_and_apply_focus focus %lu", focus->id );
17851795

17861796
if ( debugFocus == true )

0 commit comments

Comments
 (0)