comparison src/video/quartz/SDL_QuartzEvents.m @ 4072:6930cd5ab933 SDL-1.2

Final fix for bug #373 ------- Comment #13 From Christian Walther 2007-07-15 10:04:56 [reply] ------- Created an attachment (id=229) [details] patch to reinstate the SDL cursor after an NSApplicationActivatedEvent Oops, you're right. My testcursor.c has diverged so far from the original that I missed that. In fact, now that I think about it, that issue isn't even addressed by the cursor rectangle patch - it is only concerned with windowed mode (and fixes the problem there as a side effect). The problem in fullscreen is still the same as before. How about the attachment for a fix? (I can confirm that [NSCursor set] doesn't seem to have any effect when called from QZ_DoActivate().)
author Sam Lantinga <slouken@libsdl.org>
date Sun, 15 Jul 2007 17:22:39 +0000
parents b8f2db95145e
children 7ea10b80eda3
comparison
equal deleted inserted replaced
4071:3d9040dcc47e 4072:6930cd5ab933
943 case NSKeyDown: 943 case NSKeyDown:
944 QZ_DoKey (this, SDL_PRESSED, event); 944 QZ_DoKey (this, SDL_PRESSED, event);
945 break; 945 break;
946 case NSFlagsChanged: 946 case NSFlagsChanged:
947 break; 947 break;
948 /* case NSAppKitDefined: break; */ 948 case NSAppKitDefined:
949 [ NSApp sendEvent:event ];
950 if ([ event subtype ] == NSApplicationActivatedEventType && (mode_flags & SDL_FULLSCREEN)) {
951 /* the default handling of this event seems to reset any cursor set by [NSCursor set] (used by SDL_SetCursor() in fullscreen mode) to the default system arrow cursor */
952 SDL_Cursor *sdlc = SDL_GetCursor();
953 if (sdlc != NULL && sdlc->wm_cursor != NULL) {
954 [ sdlc->wm_cursor->nscursor set ];
955 }
956 }
957 break;
949 /* case NSApplicationDefined: break; */ 958 /* case NSApplicationDefined: break; */
950 /* case NSPeriodic: break; */ 959 /* case NSPeriodic: break; */
951 /* case NSCursorUpdate: break; */ 960 /* case NSCursorUpdate: break; */
952 default: 961 default:
953 [ NSApp sendEvent:event ]; 962 [ NSApp sendEvent:event ];