Fullscreen loss of focus in multiscreen setups

I was talking to somebody on IRC and this issue was brought up again,
it was discussed before but if I recall correctly nothing happened in
the end.

The issue is as follows: when a fullscreen window loses focus, it gets
minimized. This makes sense in single screen setups, where it’s needed
to make room for other programs. On multiscreen setups though it
doesn’t make much sense, since it’s perfectly possible the focus was
given to something in another screen. It gets even worse if the
program has multiple fullscreen windows on separate screens (which was
the case being brought up), since only one window is visible at any
given time.

What would be the best way to tackle this? The dumb way would be to
not minimize fullscreen windows on multiscreen setups. Maybe a better
one would be to make it toggable (i.e. the program tells SDL if it
wants the window to be minimized or not), which is not perfect but
would allow for workarounds.

What do you think about this?

2014-07-14 16:22 GMT+02:00 Sik the hedgehog <sik.the.hedgehog at gmail.com>:

I was talking to somebody on IRC and this issue was brought up again,
it was discussed before but if I recall correctly nothing happened in
the end.

The issue is as follows: when a fullscreen window loses focus, it gets
minimized. This makes sense in single screen setups, where it’s needed
to make room for other programs. On multiscreen setups though it
doesn’t make much sense, since it’s perfectly possible the focus was
given to something in another screen. It gets even worse if the
program has multiple fullscreen windows on separate screens (which was
the case being brought up), since only one window is visible at any
given time.

What would be the best way to tackle this? The dumb way would be to
not minimize fullscreen windows on multiscreen setups. Maybe a better
one would be to make it toggable (i.e. the program tells SDL if it
wants the window to be minimized or not), which is not perfect but
would allow for workarounds.

What do you think about this?

Have you tried

SDL_SetHint("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "0");

before?

…didn’t even notice that was a thing.

Told that person about it, he’ll try it tomorrow (so I can’t tell if
it’s enough). It does seem like the “program tells SDL” idea I
mentioned though.

2014-07-14 11:46 GMT-03:00, Jonas Kulla :> 2014-07-14 16:22 GMT+02:00 Sik the hedgehog <@Sik_the_hedgehog>:

I was talking to somebody on IRC and this issue was brought up again,
it was discussed before but if I recall correctly nothing happened in
the end.

The issue is as follows: when a fullscreen window loses focus, it gets
minimized. This makes sense in single screen setups, where it’s needed
to make room for other programs. On multiscreen setups though it
doesn’t make much sense, since it’s perfectly possible the focus was
given to something in another screen. It gets even worse if the
program has multiple fullscreen windows on separate screens (which was
the case being brought up), since only one window is visible at any
given time.

What would be the best way to tackle this? The dumb way would be to
not minimize fullscreen windows on multiscreen setups. Maybe a better
one would be to make it toggable (i.e. the program tells SDL if it
wants the window to be minimized or not), which is not perfect but
would allow for workarounds.

What do you think about this?

Have you tried

SDL_SetHint("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "0");

before?