Fixed bug: No right mouse button events during FullScreen Mac OS
Something inside setStyleMask mucks with the view responder chain, which prevents the listener from hearing the right mouse down events. We just reset the listener after changing the style to fix this.
--- 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];