Full screen through window manager |
Rainer Deyke
Guest
|
Under Linux (Mint 17 "Qiana", LXDE desktop environment), I can toggle
full-screen mode by pressing F11. This seems to happen through the window manager, and affects all programs, whether they use SDL or not. However, I don't see any way to detect this happening through SDL. I get SDL_WINDOWEVENT_MAXIMIZED events when the window is maximized, but only generic SDL_WINDOWEVENT_RESIZED events when the window goes to or from full screen. (Other programs can and do respond to full screen toggle through F11.) In addition, if I create a full screen window with SDL_WINDOW_FULLSCREEN_DESKTOP and then press F11, I get a window that is resizable even through I did not specify SDL_WINDOW_RESIZABLE. -- Rainer Deyke _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
Full screen through window manager |
Rainer Deyke
Guest
|
On 27.11.2014 13:19, Rainer Deyke wrote:
No, I'm /supposed/ to get SDL_WINDOWEVENT_MAXIMIZED events when the window is maximized, but it turns out that I get a SDL_WINDOWEVENT_RESIZED event instead. This, at least, is a clear bug, so I reported it as https://bugzilla.libsdl.org/show_bug.cgi?id=2793. -- Rainer Deyke _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
Full screen through window manager |
Jonas Kulla
Guest
|
2014-11-28 10:15 GMT+01:00 Rainer Deyke:
Aren't fullscreen and maximized conceptually different though? With the former the client contents take up the entire screen, while with maximized you still have the window decorations around it. Also, how would you react differently based on whether you're maximized? If you get a resized event, just draw your contents at that size, and it will just work, no? |
|||||||||||||||
|
Full screen through window manager |
Rainer Deyke
Guest
|
On 28.11.2014 10:30, Jonas Kulla wrote:
Yes, they are. A window can have one of four states: normal, minimized, maximized, or full screen. SDL provides ways to check for the first three (although they seem to be broken for Linux, at least in my desktop environment), but no way to check for the last one. (To complicate things, these states can "stack". For example, if a maximized window is minimized and then restored, it should restore to a maximized state. Maximized, minimized, and full screen are best represented as individual bits, where the full screen bit overrides the maximized bit and the minimized bit overrides the other two bits if multiple bits are set.)
I'm trying to save the state of the window so that I can restore it to the same state when program is run again. This includes saving the maximized and full screen states. Other programs react to the full screen state (but not the maximized state) by hiding UI elements such as the menu bar. -- Rainer Deyke _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||||||
|