csgo-osx-linux icon indicating copy to clipboard operation
csgo-osx-linux copied to clipboard

Stop auto minimizing on focus loss

Open kvbev opened this issue 2 years ago • 3 comments

Your system information

https://gist.github.com/kvbev/405da3726c143f2946a6d08c20c31139

Please describe your issue in as much detail as possible:

desktop KDE wayland

game will auto minimize whenever it losses focus when switching between virtual desktops. my hotkeys to move between virtual desktops are Meta+(1-6) and to move windows between them Meta+Shift+(1-6) changing video options between fullscreen, fullscreen windowed and windowed makes no difference. before todays update i could at least set the game to windowed then fullscreen the game using Meta+f but now the game will auto minimize even when set to windowed.

I never had this issue on csgo and do not have this issue with any older valve games or any games running on proton. switching between virtual desktops is instant in these cases and the game stays fullscreen on the desktop its started on and can even be moved (Meta+Shift+(1-6)) without minimizing. it is only cs2 that will auto minimize on focus loss, please provide a fix as i switch virtual desktops often even when gaming. thank you.

Steps for reproducing this issue:

Switch virtual desktop, cs2 game auto minimizes

kvbev avatar Feb 07 '24 10:02 kvbev

Hello @kvbev, it might be interesting to test if setting the game's launch options to SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 %command% is an effective workaround to this issue.

kisak-valve avatar Feb 07 '24 14:02 kisak-valve

Hello @kvbev, it might be interesting to test if setting the game's launch options to SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 %command% is an effective workaround to this issue.

I just tested it and it works fine. In my opinion this behavior should be by default.

t0ssox avatar Feb 07 '24 20:02 t0ssox

SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 works for me too, and i see its referenced in a few other issues too. i also think this should be default for fullscreen windowed and windowed in game settings. thank you for the workaround, closing.

kvbev avatar Feb 08 '24 02:02 kvbev