src/video/cocoa/SDL_cocoawindow.m
changeset 5502 ed5f117c949d
parent 5478 6b65ff3cee62
child 5535 96594ac5fd1a
--- a/src/video/cocoa/SDL_cocoawindow.m	Mon Mar 21 13:33:53 2011 -0700
+++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Mar 21 16:36:17 2011 -0700
@@ -792,6 +792,11 @@
     NSWindow *nswindow = data->nswindow;
     NSRect rect;
 
+    /* The view responder chain gets messed with during setStyleMask */
+    if ([[nswindow contentView] nextResponder] == data->listener) {
+        [[nswindow contentView] setNextResponder:nil];
+    }
+
     if (fullscreen) {
         SDL_Rect bounds;
 
@@ -827,6 +832,11 @@
         }
     }
 
+    /* The view responder chain gets messed with during setStyleMask */
+    if ([[nswindow contentView] nextResponder] != data->listener) {
+        [[nswindow contentView] setNextResponder:data->listener];
+    }
+
     s_moveHack = 0;
     [nswindow setFrameOrigin:rect.origin];
     [nswindow setContentSize:rect.size];