Prevent spring from minimizing when you click on 2nd display

Prevent spring from minimizing when you click on 2nd display

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Gambit
Posts: 3
Joined: 28 Jul 2016, 19:20

Prevent spring from minimizing when you click on 2nd display

Post by Gambit »

I use two monitors. One runs spring and the other runs springlobby, chat, web, etc. When I click on the second monitor, spring is minimized. I find this annoying but it is the default SDL2 behaviour.

You can prevent spring from minimizing itself when it loses focus using the following environment variable (linux syntax):
export SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0

The analogous windows environment variable should work as well.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Prevent spring from minimizing when you click on 2nd display

Post by gajop »

It probably doesn't minimize if you don't use FullScreen
Gambit
Posts: 3
Joined: 28 Jul 2016, 19:20

Re: Prevent spring from minimizing when you click on 2nd display

Post by Gambit »

I use windowed/borderless mode and this still happens unless you set the environment variable.

In 100.0 the problem was even more severe, I had to hack in the SDL_SetHint() call as the environment variable alone would not suffice.
Gambit
Posts: 3
Joined: 28 Jul 2016, 19:20

Re: Prevent spring from minimizing when you click on 2nd display

Post by Gambit »

I use windowed mode, not fullscreen.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Prevent spring from minimizing when you click on 2nd display

Post by abma »

this behaviour could explain some performance related bugs...

mantised: https://springrts.com/mantis/view.php?id=5323 (imo a config setting is better for now)
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Prevent spring from minimizing when you click on 2nd display

Post by gajop »

abma wrote:this behaviour could explain some performance related bugs...
Is that when it randomly decides to kill your FPS?
I've noticed something like this when testing Chobby, it would kill my FPS after a /luaui reload (which might also set fullscreen/windowed behavior), but it can be restored to normal by toggling maximize.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Prevent spring from minimizing when you click on 2nd display

Post by abma »

gajop wrote:Is that when it randomly decides to kill your FPS?
I've noticed something like this when testing Chobby, it would kill my FPS after a /luaui reload (which might also set fullscreen/windowed behavior), but it can be restored to normal by toggling maximize.
exactly, but atm its just a "could be related".
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Prevent spring from minimizing when you click on 2nd display

Post by Forboding Angel »

Spring's borderless window kills fps for me, and it doesn't act correctly in any case.

So, I use window manager (mmfh). It is invaluable to me as windows has shit window management.

My Window Management folder on Gdrive (because these programs are difficult to find) of programs that I use to mane windo management in windows not so cumbersome:
https://drive.google.com/folderview?id= ... sp=sharing
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Prevent spring from minimizing when you click on 2nd display

Post by abma »

Post Reply

Return to “Help & Bugs”