| Summary: | Mac: enable the fullscreen button in 10.7+ for resizable windows | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Alex Szpakowski <amaranth72> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | enhancement | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Other | ||
|
Description
Alex Szpakowski
2013-11-11 02:01:59 UTC
Sweet! There are a few issues I've noticed so far when testing: - When the mouse is moved to the top of the screen (where the menubar normally is) in FULLSCREEN_DESKTOP mode, it causes a short stutter in performance. This is only happening now that a FULLSCREEN_DESKTOP window is always in its own Space, probably because the menubar is being automatically shown behind it. - If a window is not resizable, the fullscreen button is still there. This would be fine because the window doesn't fill the entire screen when the button is pressed if it's not resizable, but what does happen is the area normally taken up by the window decoration is converted into renderable space, so the window does actually resize slightly when it's not supposed to be resizable. - Again when a window is not resizable and it's in its own Space via the Fullscreen button, toggling FULLSCREEN_DESKTOP doesn't work properly (on the first toggle it doesn't fill the space completely.) - As above, if the window is not resizable and is in its own Space via the Fullscreen button, toggling SDL_WINDOW_FULLSCREEN (display mode switching) and then toggling back will make the window move to the top left corner instead of being centered. - If the window starts out as normal non-resizable and FULLSCREEN_DESKTOP is set via SDL_SetWindowFullscreen, the top menubar is now accessible when the user mouses over it (this is different from the old behaviour.) If the user presses the exit fullscreen button from said menubar, the window's decorations do not appear properly and I get some rendering glitches. Great testing! I'm heading to bed, but feel free to get the latest code (I fixed some compile issues) and submit fixes! :) I'm not sure I'd be able to nail these issues (at least with my current level of experience with Cocoa/ObjC). I found more bugs already - I feel like this feature might need to be re-implemented in a different way, it breaks quite a lot of things as-is. If the issues can't be resolved nicely then personally I'd rather stick with the old code for now. More issues: - If I destroy a window that is in its own fullscreen Space, I get this debug message from Cocoa in stdout: [6747:507] not in fullscreen state - If I immediately recreate a new non-fullscreen window after destroying the one that was in a fullscreen Space, sometimes the view doesn't switch away from the now-empty Space until I manually do it. - Sometimes after exiting display-mode fullscreen if the window was in Space-mode fullscreen before switching to display-mode fullscreen, on top of the previously mentioned issues, clicking the program icon in the Dock won't take you to its window (which is stuck in its own Space.) Okay, I did a bunch of testing and it looks like this doesn't coexist well with the standard fullscreen mode code, so I added a hint for people to be able to switch between behaviors: SDL_HINT_VIDEO_FULLSCREEN_SPACES It doesn't work well yet with multiple windows, but this is a good start for someone doing a game and wanting to use the new style fullscreen mode. Can you take a look? Shipping for 2.0.2! :) |