The beeping stopped.
authorSam Lantinga <slouken@libsdl.org>
Tue, 25 Sep 2012 20:58:23 -0700
changeset 6461 6d17371235d3
parent 6459 df49d3db1cb9
child 6462 5e09ac1aba80
The beeping stopped. And, other people may need to catch key events using their own delegate.
src/video/cocoa/SDL_cocoaevents.m
--- a/src/video/cocoa/SDL_cocoaevents.m	Tue Sep 25 20:49:43 2012 -0700
+++ b/src/video/cocoa/SDL_cocoaevents.m	Tue Sep 25 20:58:23 2012 -0700
@@ -206,23 +206,17 @@
         case NSMouseMoved:
         case NSScrollWheel:
             Cocoa_HandleMouseEvent(_this, event);
-            /* Pass through to NSApp to make sure everything stays in sync */
-            [NSApp sendEvent:event];
             break;
         case NSKeyDown:
         case NSKeyUp:
         case NSFlagsChanged:
             Cocoa_HandleKeyEvent(_this, event);
-            /* Fall through to pass event to NSApp; er, nevermind... */
-
-            /* Add to support system-wide keyboard shortcuts like CMD+Space */
-            if (([event modifierFlags] & NSCommandKeyMask) || [event type] == NSFlagsChanged)
-               [NSApp sendEvent: event];
             break;
         default:
-            [NSApp sendEvent:event];
             break;
         }
+        /* Pass through to NSApp to make sure everything stays in sync */
+        [NSApp sendEvent:event];
     }
     [pool release];
 }