CS:GO freezes with cursor movement after focus loss
Affected version
Pop! OS 20.04 Gnome 3.36.2 on X
Bug summary
When playing CS:GO, after the game loses and regains focus, in menus (both the main menu and in-game buy menu), the game freezes while the mouse is moving. This only happens in fullscreen/fullscreen windowed, not windowed only mode, so I think it has something to do with compositing. This bug is not present when using KDE Plasma. This issue was originally posted in the ValveSoftware/csgo-osx-linux repository.
Steps to reproduce
-
Launch game, starting in fullscreen mode (Behaves as expected)
-
Switch focus to another window
-
Return to game, do anything to make a cursor appear (open main menu, buy menu, console, etc.)
-
Move the cursor: the game freezes until the cursor comes to rest.
-
(Temporary fix) Open and close the steam overlay. Now the game should perform normally until focus is lost again.
What happened
The game freezes and the cursor responds slowly, as if many mouse events are being dropped.
What did you expect to happen
Game should perform the same before focus is lost and after focus is returned, as it does when running in windowed mode.
Relevant logs, screenshots, screencasts etc.
I attempted to get some more data using xprop -spy, but
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_FOCUSED
_GTK_EDGE_CONSTRAINTS(CARDINAL) = 170
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified location: 640, 300
_GTK_EDGE_CONSTRAINTS(CARDINAL) = 170
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN
_GTK_EDGE_CONSTRAINTS(CARDINAL) = 170
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_FOCUSED
_GTK_EDGE_CONSTRAINTS(CARDINAL) = 170
is all it logs during the focus loss and return, with nothing logged when toggling the steam overlay on and off. I'd be happy to dump more logs, but I don't know what else I should use to get relevant information.