Multiple fullscreen windows

Hi.

I’m using SDL2 and trying to create multiple fullscreen windows on the Windows platform. (if there is a better way of having a multiple monitor fullscreen application, please say how!)

If I try to create my window using SDL_WINDOW_FULLSCREEN_DESKTOP flag for every window, I see the first screen coming up, then it disappears, and the second one opens and it stays. So in the end, this opens the first one briefly and you get a second working one. Not what I want.

If I use SDL_WINDOW_FULLSCREEN, both screens flicker about 4 times each (although desktop resolution stays constant), and I get a black screen on my primary display. Also not what I want :).

Is there a way of having this working?

Thank you in advance!

If I try to create my window using SDL_WINDOW_FULLSCREEN_DESKTOP flag
for every window, I see the first screen coming up, then it disappears,
and the second one opens and it stays. So in the end, this opens the
first one briefly and you get a second working one. Not what I want.

You have to set the SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS hint to 0 if you
want multiple fullscreen windows. SDL minimizes the fullscreen window
by default if it loses focus.

Keep in mind that when you use this hint you have to let the user
easily access the other windows again somehow. May be tricky because
there are subtle differences for every platform.

Attached is some code that creates fullscreen windows for up to 10
displays and shows the layout. Not sure if that’s the recommended way
of going at this though.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: multiple_fullscreen_windows.c
Type: text/x-csrc
Size: 4573 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20131118/f2e4c0e7/attachment.c