We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1030

Summary: SDL_SetWindowFullscreen and SDL_RestoreWindow issues
Product: SDL Reporter: Karl F. Glatzer <karl.glatzer>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Linux   

Description Karl F. Glatzer 2010-07-26 08:50:43 UTC
I'm not sure why, but it seems like SDL_SetWindowFullscreen doesn't set nor remove the _NET_WM_STATE_FULLSCREEN Atom, SDL_RestoreWindow doesn't remove it aswell.
Comment 1 Karl F. Glatzer 2010-07-27 12:21:28 UTC
After looking at the new Window handling for X11, I found out that you kinda left out half of what my patch was doing ^^

I maybe should have mentioned sooner that changing Atoms while the Window is shown does work and should be done!

You should change X11_SetWindowMaximized and other functions where you check if the window is mapped and thus not set Maximized nor Fullscreen, so that they do set them ignoring if the window is mapped or not.

Also SDL should check in PropertyNotify if _NET_WM_STATE was changed and if it still has _NET_WM_STATE_FULLSCREEN or not. Then setting or unsetting SDL_WINDOW_FULLSCREEN respectively.
Comment 2 Sam Lantinga 2011-01-19 23:52:39 UTC
Ah, okay, thanks.  Do you have time to submit a patch so it works exactly the way you wanted?
Comment 3 Sam Lantinga 2013-05-21 01:19:36 UTC
I think the latest code is doing the right thing.  Please let me know and add a patch with test cases so we can verify behavior if it still needs to be fixed.

Thanks!