Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: marius on July 21, 2013, 10:29:50 PM




Title: SDL2
Post by: marius on July 21, 2013, 10:29:50 PM
Looking into switching to SDL2 since it understands multi-display (and multi-window but haven't played with that yet..)

Cooked up a little test that allows a window to be dragged across displays and understands which current display to toggle fullscreen on at its native resolution.

Thought it might be handy for some here; did not find a ready sample out there just yet  ;D
Any programmers out there with multi-display mac or linux setups? Does this work?

https://code.google.com/p/boxplorer2/source/browse/trunk/sdl2-test.cc (https://code.google.com/p/boxplorer2/source/browse/trunk/sdl2-test.cc)


Title: Re: SDL2
Post by: 3dickulus on July 23, 2013, 05:05:37 PM
Not sure you need that with linux I think this functionality is handled by the desktop window manager/x11, I use dual monitors 1400x1050 and 1280x1024 and management seems transparent, no problems with fullscreen on one monitor or fullview where one window covers both monitors even with the different resolutions the window looks like it should, dragging windows between them is fine, fullscreen on one monitor adapts to the new monitor size.

is your code for a situation where the window manager gets kicked out and your proggy takes over the entire display and manages it's own windows?


Title: Re: SDL2
Post by: marius on July 23, 2013, 06:39:24 PM
Not sure you need that with linux I think this functionality is handled by the desktop window manager/x11, I use dual monitors 1400x1050 and 1280x1024 and management seems transparent, no problems with fullscreen on one monitor or fullview where one window covers both monitors even with the different resolutions the window looks like it should, dragging windows between them is fine, fullscreen on one monitor adapts to the new monitor size.

is your code for a situation where the window manager gets kicked out and your proggy takes over the entire display and manages it's own windows?


Haven't tried multi display linux but on win7 it sure wouldn't work otherwise.
Life is much better now that oculus rendering goes full screen on that display w/o having to duplicate desktops, or worse (disable main desktop)


Title: Re: SDL2
Post by: 3dickulus on July 23, 2013, 07:08:55 PM
I imagine Mac would be similar, haven't tried oculus