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 1183 - Flushing specific events (sometimes?) doesn't work
Summary: Flushing specific events (sometimes?) doesn't work
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: x86 Mac OS X 10.6
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-14 12:16 UTC by Vern Jensen
Modified: 2013-05-21 02:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vern Jensen 2011-04-14 12:16:07 UTC
I discovered this one while messing with displaying the Carbon NavCreatePutFileDialog. At some point, this dialog resulting in my SDL application getting SDL_WINDOWEVENT_FOCUS_LOST events. Makes sense, since the Nav open/save dialog could be considered a different window that has "gained" focus.

So I tried calling:

SDL_FlushEvents(SDL_WINDOWEVENT_FOCUS_GAINED, SDL_WINDOWEVENT_FOCUS_LOST);

as well as:

SDL_FlushEvents(SDL_WINDOWEVENT_FOCUS_LOST, SDL_WINDOWEVENT_FOCUS_LOST);

But this DID work:

SDL_FlushEvents( SDL_ALLEVENTS );

I don't know why flushing all events works when trying to flush a specific one doesn't, but I seem to remember running into this before, for other event types too. I've only verified it's a problem for this specific event, but I'm guessing it might be any kind of specific event.
Comment 1 Sam Lantinga 2011-04-14 12:33:43 UTC
Did you try debugging into the SDL library? It may be a simple mistake in the code.
Comment 2 Sam Lantinga 2013-05-21 02:34:35 UTC
No response in 2 years, closing bug.