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 - Mac: SDL_WINDOWEVENT_EXPOSED is never sent
Summary: Mac: SDL_WINDOWEVENT_EXPOSED is never sent
Status: RESOLVED DUPLICATE of bug 2644
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.8
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-28 05:02 UTC by Alex Szpakowski
Modified: 2015-02-24 04:41 UTC (History)
1 user (show)

See Also:


Attachments

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