protonscr

TF2 should not minimize when it loses focus.

steamclosed MOVED: Team Fortress 2reviewed
ValveSoftware/steam-for-linux#786 · opened 2013-01-22 by RobertZenz · updated 2018-04-01 · 9 comments · github
RRobertZenz 2013-01-22 github

Team Fortress 2 is at the moment minimizing everytime it loses focus. That is actually not a very good behavior when it comes to multi-monitor environments. I want to keep TF2 open on my main monitor while I do something different on my second one (like chatting with someone).

Mmikesart 2013-01-23 github

I think this behavior is up to the window manager you're using. We're not doing anything special in tf2 to do this. Perhaps running in a large window would achieve what you want?

RRobertZenz 2013-01-23 github

That's odd, I was running TF2Beta by accident for quite some time and it did not have that behavior. It only started when I removed TF2Beta and installed TF2. But I'll check my settings. Thanks.

Mmikesart 2013-01-23 github

Ok, I was wrong. It's not the WM - it's SDL. And there is a SDL hint to turn this behavior off:

export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0

After doing that, I could start TF2 and it didn't minimize when the focus was lost...

RRobertZenz 2013-01-23 github

Interesting, thanks for letting me know. I was also able to enforce "not minimizing" via my WM (Sawfish, ha!) so I did already shrug it off as some oddity in my configuration (wouldn't have been the first).

In that case I stick to my opinion that it should not do that by default. ;P

Eekohl 2013-01-29 github

I've had the same problem. TF2 didn't use to do this, but recently started. This is inconsistent with other games such as counter strike which don't show the same behaviour. I can confirm the SDL export works.

Ssjuxax 2013-03-04 github

Same issue here. Haven't tried the SDL export yet but will do so shortly. Would prefer if TF2 undid whatever caused this to start happening.

RRobertZenz 2013-04-04 github

Out of curiosity, is this now closed with "use the export", or should this be reopened/fixed?

Ssalt86 2018-04-01 github

Can anyone translate into layman's terms? I would like my tf2 to not minimize while I'm waiting for matchmaking.

Kkisak-valve maintainer 2018-04-01 github

Hello @salt86, one way is to add SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 %command% to TF2's launch options in steam. Another is to run steam from a launch script that has

#!/bin/bash
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0
steam

or set the env variable in one of the various environment config files that get used by your DE.