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 1071 - Mouse enter/leave events broken on Mac
Summary: Mouse enter/leave events broken on Mac
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.0
Hardware: Other Mac OS X 10.6
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-25 10:59 UTC by Vern Jensen
Modified: 2011-01-24 17:49 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 2010-10-25 10:59:06 UTC
The SDL_WINDOWEVENT_ENTER and SDL_WINDOWEVENT_LEAVE are each called *every single time the mouse is moved* on MacOS X 10.6. With the event handler below, I get a stream of printf() statements in the console log for moving the mouse, regardless of whether the cursor enters/leaves the window or not.

void MyHandleSDLEvent(SDL_Event * event, int *done) 
{ 
switch (event->type) 
{ 

case SDL_WINDOWEVENT: 
switch (event->window.event) 
{ 
case SDL_WINDOWEVENT_CLOSE: 
*done = 1; 
break; 

case SDL_WINDOWEVENT_ENTER: 
printf("Mouse entered our window! windowID = %d \n", event->window.windowID); 
break; 

case SDL_WINDOWEVENT_LEAVE: 
printf("Mouuse left the window! windowID = %d \n", event->window.windowID); 
break; 

} 
break;
Comment 1 Sam Lantinga 2011-01-24 16:16:54 UTC
I believe this is fixed in the latest snapshot, can you retest?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 2 Vern Jensen 2011-01-24 16:49:26 UTC
Yup, works perfectly now. Thanks!
Comment 3 Sam Lantinga 2011-01-24 17:49:18 UTC
Great! :)