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 2066

Summary: Mac: SDL_WINDOWEVENT_EXPOSED is never sent
Product: SDL Reporter: Alex Szpakowski <amaranth72>
Component: videoAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED DUPLICATE QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.8   

Description Alex Szpakowski 2013-08-28 05:02:22 UTC
In Mac OS X, the SDL_WINDOWEVENT_EXPOSED event is never triggered as far as I can tell.

SDL's Cocoa code sends the event when a window receives "NSWindowDidExposeNotification", however according to Apple's documentation, that notification is only sent for windows which have "nonretained" backing. SDL's Cocoa windows are created with "NSBackingStoreBuffered" rather than "NSBackingStoreNonretained".

In practice, I have only ever seen the window need to be redrawn in OS X when it's resized - although I haven't done exhaustive tests.

Perhaps SDL_WINDOWEVENT_EXPOSED should be sent when the window receives a resize notification, or when GL context updates are supposed to be scheduled - the documentation for [NSOpenGLContext update] seems to imply it should be called in similar circumstances to when I've noticed the window should be redrawn, although I've never had the need when the window was just moved.
Comment 1 Ryan C. Gordon 2015-02-24 04:41:11 UTC
Think this is a dupe.

--ryan.

*** This bug has been marked as a duplicate of bug 2644 ***