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 - Application not receiving window resize event when transitioning to full screen mode
Summary: Application not receiving window resize event when transitioning to full scre...
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.3
Hardware: All Mac OS X (All)
: P2 minor
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-15 15:51 UTC by David
Modified: 2016-03-19 05:10 UTC (History)
2 users (show)

See Also:


Attachments
Patch to send resize event when toggling fullscreen mode (601 bytes, patch)
2014-07-15 15:51 UTC, David
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.