diff options
Diffstat (limited to 'src/gui/kernel/qcocoawindow_mac.mm')
-rw-r--r-- | src/gui/kernel/qcocoawindow_mac.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm index 6b30444..ba121cd 100644 --- a/src/gui/kernel/qcocoawindow_mac.mm +++ b/src/gui/kernel/qcocoawindow_mac.mm @@ -86,6 +86,12 @@ extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview. return YES; } +/*********************************************************************** + BEGIN Copy and Paste between QCocoaWindow and QCocoaPanel + This is a bit unfortunate, but thanks to the dynamic dispatch we + have to duplicate this code or resort to really silly forwarding methods +**************************************************************************/ + /* The methods keyDown, keyUp, and flagsChanged... These really shouldn't ever get hit. We automatically say we can be first responder if we are a window. @@ -173,6 +179,18 @@ extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview. [self release]; } + +- (BOOL)makeFirstResponder:(NSResponder *)responder +{ + if (responder == nil) + return NO; + return [super makeFirstResponder:responder]; +} + +/*********************************************************************** + END Copy and Paste between QCocoaWindow and QCocoaPanel +***********************************************************************/ + + (Class)frameViewClassForStyleMask:(NSUInteger)styleMask { if (styleMask & QtMacCustomizeWindow) |