The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Window bounds weirdness
ischmidt


Joined: 29 Aug 2014
Posts: 1
Is there some way in SDL2 to determine the usable desktop size, minus any docks/menubars/taskbars? On OS X this is the "visibleFrame" property of the NSScreen, for example. SDL_GetWindowMaximumSize() sounds like it should do that, but the code looks like it simply returns what SDL_SetWindowMaximumSize() sets.

This is especially problematic in Ubuntu with the Unity desktop where creating an SDL window larger than is 'allowed' causes it to be created offset from where it should be, at which point part of your content is off the screen and the mouse coordinates returned are offset by the width of the dock and the height of the menubar. I'm cheating around it at the moment by disallowing a window size within 100 pixels of the desktop resolution but that's obviously not ideal.