Steam for Linux

Steam for Linux

Swede Dec 20, 2014 @ 4:41am
Some games minimize when focus is lost
I've noticed this in both Rogue Legacy, and in Civ5. In either game, if the game loses focus (either through alt-tab or me clicking elsewhere) the game minimises. I run a multi-monitor setup with games on the main monitor and I would really prefer the game stay on the main monitor and not minimize. Is this happening on purpose? And is it a game-specific problem or is it more generic? I've noticed other games don't have this behaviour.
< >
Showing 1-5 of 5 comments
Dusk of Oolacile Dec 20, 2014 @ 5:16am 
Window behavior on linux depends on the window manager. Try configuring it, or try another one. SDL settings may also affect this, if the game uses SDL.
Swede Dec 20, 2014 @ 2:09pm 
Thanks for the tip, that got me towards the fix :)

Firstly, this is "by default" behaviour of SDL. It can be disabled in the code by setting SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS to 0. It'd be nice if there was a setting for doing so in-game.

However, since we can't edit the code, we have to use a different approach. SDL also recognises environmental variables. So instead of running Civ5 from inside Steam, we run it from the command line. You'll still have to have steam running, first. Then navigate to the directory containing Civ5XP. Then run

SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST=0 ./Civ5XP

Alternately, you can export it in some larger scope.



Dusk of Oolacile Dec 20, 2014 @ 2:28pm 
Actually you can use environment variables in Steam. Right click the game, select properties, then set launch options. Put this in the field:
SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST=0 %command%
Then click OK and you're done.
Swede Dec 20, 2014 @ 5:04pm 
Oooh. I did look at the launch options, but I didn't know whether the options would be listed before or after %command% (and I obviously didn't know the syntax). Thanks!
Eternal Sep 20, 2017 @ 7:48pm 
Ugh, that's a beyond terrible solution. Big Picture Mode itself has this same problem and a global export of `SDL_VIDEO_MINIMIZE_ON_FOCUS_LOST=0` doesn't help.

Having to go into each game and do this is pretty ridiculous also.
< >
Showing 1-5 of 5 comments
Per page: 1530 50

Date Posted: Dec 20, 2014 @ 4:41am
Posts: 5