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

Summary: Flushing specific events (sometimes?) doesn't work
Product: SDL Reporter: Vern Jensen <vern>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86   
OS: Mac OS X 10.6   

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.