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 2645

Summary: Application not receiving window resize event when transitioning to full screen mode
Product: SDL Reporter: David <david>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2 CC: amaranth72, david
Version: 2.0.3   
Hardware: All   
OS: Mac OS X (All)   
Attachments: Patch to send resize event when toggling fullscreen mode

Description David 2014-07-15 15:51:10 UTC
Created attachment 1758 [details]
Patch to send resize event when toggling fullscreen mode

On OS X when toggling full screen mode the OS will:
1) capture the current window image 
2) resize the window 
3) send a draw event to the application 
4) capture an image at the new size 
5) cross fade between the old image size and the new image size

SDL is blocking the resize event that is sent which makes it impossible to handle full screen mode correctly.

The attached patch removes the full screen check when send a resize event which now allows an application to get the correct full screen mode effect.
Comment 1 Alex Szpakowski 2015-02-23 03:59:53 UTC
SDL always sends a resize event when the fullscreen transition completes, so while a perfect crossfade effect isn't shown in SDL apps, the app will still receive a correct resize event when going into the Spaces fullscreen at least.

SDL's current code completely blocks while it waits for the fullscreen transition to complete, in order to avoid some nasty issues that can show up when an app does something to the window while it's transitioning.
A side effect of blocking there is that the cross-fade effect won't ever be able to displayed properly though, so I guess this issue is probably a "wontfix" unless SDL's Cocoa window code is re-architected to somehow avoid issues that can happen when transitioning to fullscreen without blocking.
Comment 2 Alex Szpakowski 2016-03-19 05:10:35 UTC
It doesn't currently make sense to send multiple resize events during the fullscreen transition because SDL blocks for the entire duration of the transition.