comparison src/video/quartz/SDL_QuartzWM.m @ 4065:0c76e6d1c3d6 SDL-1.2

Fixed bug #373 Patch contributed from Transgaming's Cider project - create a window and view in fullscreen mode so the cursor can be set
author Sam Lantinga <slouken@libsdl.org>
date Sat, 14 Jul 2007 08:00:50 +0000
parents 2780f547f5e7
children 58a5055da431
comparison
equal deleted inserted replaced
4064:940fddb81bea 4065:0c76e6d1c3d6
103 cursor_visible = NO; 103 cursor_visible = NO;
104 } 104 }
105 } 105 }
106 106
107 BOOL QZ_IsMouseInWindow (_THIS) { 107 BOOL QZ_IsMouseInWindow (_THIS) {
108 if (qz_window == nil) return YES; /*fullscreen*/ 108 if (qz_window == nil || (mode_flags & SDL_FULLSCREEN)) return YES; /*fullscreen*/
109 else { 109 else {
110 NSPoint p = [ qz_window mouseLocationOutsideOfEventStream ]; 110 NSPoint p = [ qz_window mouseLocationOutsideOfEventStream ];
111 p.y -= 1.0f; /* Apparently y goes from 1 to h, not from 0 to h-1 (i.e. the "location of the mouse" seems to be defined as "the location of the top left corner of the mouse pointer's hot pixel" */ 111 p.y -= 1.0f; /* Apparently y goes from 1 to h, not from 0 to h-1 (i.e. the "location of the mouse" seems to be defined as "the location of the top left corner of the mouse pointer's hot pixel" */
112 return NSPointInRect(p, [ window_view frame ]); 112 return NSPointInRect(p, [ window_view frame ]);
113 } 113 }