src/video/cocoa/SDL_cocoawindow.m
changeset 5502 ed5f117c949d
parent 5478 6b65ff3cee62
child 5535 96594ac5fd1a
     1.1 --- a/src/video/cocoa/SDL_cocoawindow.m	Mon Mar 21 13:33:53 2011 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoawindow.m	Mon Mar 21 16:36:17 2011 -0700
     1.3 @@ -792,6 +792,11 @@
     1.4      NSWindow *nswindow = data->nswindow;
     1.5      NSRect rect;
     1.6  
     1.7 +    /* The view responder chain gets messed with during setStyleMask */
     1.8 +    if ([[nswindow contentView] nextResponder] == data->listener) {
     1.9 +        [[nswindow contentView] setNextResponder:nil];
    1.10 +    }
    1.11 +
    1.12      if (fullscreen) {
    1.13          SDL_Rect bounds;
    1.14  
    1.15 @@ -827,6 +832,11 @@
    1.16          }
    1.17      }
    1.18  
    1.19 +    /* The view responder chain gets messed with during setStyleMask */
    1.20 +    if ([[nswindow contentView] nextResponder] != data->listener) {
    1.21 +        [[nswindow contentView] setNextResponder:data->listener];
    1.22 +    }
    1.23 +
    1.24      s_moveHack = 0;
    1.25      [nswindow setFrameOrigin:rect.origin];
    1.26      [nswindow setContentSize:rect.size];