comparison src/video/cocoa/SDL_cocoawindow.m @ 5059:00d1fef487c5

Fix double mouse motion in OS X Simply ignore the event handler for Windowed mode in fullscreen.
author Jjgod Jiang <gzjjgod@gmail.com>
date Fri, 21 Jan 2011 00:25:08 +0100
parents bdff53ed6c8b
children 9e9940eae455
comparison
equal deleted inserted replaced
5058:03db7d4b02b4 5059:00d1fef487c5
229 229
230 - (void)mouseMoved:(NSEvent *)theEvent 230 - (void)mouseMoved:(NSEvent *)theEvent
231 { 231 {
232 SDL_Window *window = _data->window; 232 SDL_Window *window = _data->window;
233 NSPoint point; 233 NSPoint point;
234
235 if (window->flags & SDL_WINDOW_FULLSCREEN)
236 return;
234 237
235 point = [theEvent locationInWindow]; 238 point = [theEvent locationInWindow];
236 point.y = window->h - point.y; 239 point.y = window->h - point.y;
237 if ( point.x < 0 || point.x >= window->w || 240 if ( point.x < 0 || point.x >= window->w ||
238 point.y < 0 || point.y >= window->h ) { 241 point.y < 0 || point.y >= window->h ) {