comparison src/video/quartz/SDL_QuartzEvents.m @ 168:e92aa316c517

Added Max's patches for building MacOS X apps on command line
author Sam Lantinga <slouken@libsdl.org>
date Tue, 04 Sep 2001 23:18:45 +0000
parents 4382c38dfbee
children 37e3ca9254c7
comparison
equal deleted inserted replaced
167:cb384ef627f6 168:e92aa316c517
204 /* Regrab the mouse */ 204 /* Regrab the mouse */
205 if (currentGrabMode == SDL_GRAB_ON) { 205 if (currentGrabMode == SDL_GRAB_ON) {
206 QZ_WarpWMCursor (this, SDL_VideoSurface->w / 2, SDL_VideoSurface->h / 2); 206 QZ_WarpWMCursor (this, SDL_VideoSurface->w / 2, SDL_VideoSurface->h / 2);
207 CGAssociateMouseAndMouseCursorPosition (0); 207 CGAssociateMouseAndMouseCursorPosition (0);
208 } 208 }
209
210 /* Hide the mouse cursor if inside the app window */
211 // FIXME
212 if (!QZ_cursor_visible) {
213 HideCursor ();
214 }
209 215
210 SDL_PrivateAppActive (1, SDL_APPINPUTFOCUS); 216 SDL_PrivateAppActive (1, SDL_APPINPUTFOCUS);
211 } 217 }
212 218
213 static void QZ_DoDeactivate (_THIS) { 219 static void QZ_DoDeactivate (_THIS) {
215 inForeground = NO; 221 inForeground = NO;
216 222
217 /* Ungrab mouse if it is grabbed */ 223 /* Ungrab mouse if it is grabbed */
218 if (currentGrabMode == SDL_GRAB_ON) { 224 if (currentGrabMode == SDL_GRAB_ON) {
219 CGAssociateMouseAndMouseCursorPosition (1); 225 CGAssociateMouseAndMouseCursorPosition (1);
226 }
227
228 /* Show the mouse cursor */
229 // FIXME
230 if (!QZ_cursor_visible) {
231 ShowCursor ();
220 } 232 }
221 233
222 SDL_PrivateAppActive (0, SDL_APPINPUTFOCUS); 234 SDL_PrivateAppActive (0, SDL_APPINPUTFOCUS);
223 } 235 }
224 236
307 break; 319 break;
308 case NSLeftMouseDragged: 320 case NSLeftMouseDragged:
309 case NSRightMouseDragged: 321 case NSRightMouseDragged:
310 case 27: 322 case 27:
311 case NSMouseMoved: 323 case NSMouseMoved:
324 if ( (SDL_VideoSurface->flags & SDL_FULLSCREEN)
325 || NSPointInRect([event locationInWindow], winRect) )
312 { 326 {
313 static int moves = 0; 327 static int moves = 0;
314 NSPoint p; 328 NSPoint p;
315 329
316 if ( SDL_VideoSurface->flags & SDL_FULLSCREEN ) { 330 if ( SDL_VideoSurface->flags & SDL_FULLSCREEN ) {