Fix double mouse motion in OS X
authorJjgod Jiang <gzjjgod@gmail.com>
Fri, 21 Jan 2011 00:25:08 +0100
changeset 5059 00d1fef487c5
parent 5058 03db7d4b02b4
child 5060 2170edcdfbd0
Fix double mouse motion in OS X Simply ignore the event handler for Windowed mode in fullscreen.
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Thu Jan 20 17:11:22 2011 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Fri Jan 21 00:25:08 2011 +0100
@@ -232,6 +232,9 @@
     SDL_Window *window = _data->window;
     NSPoint point;
 
+    if (window->flags & SDL_WINDOW_FULLSCREEN)
+        return;
+
     point = [theEvent locationInWindow];
     point.y = window->h - point.y;
     if ( point.x < 0 || point.x >= window->w ||