summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qcocoapanel_mac.mm5
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm
index c17b30c..95e20af 100644
--- a/src/gui/kernel/qcocoapanel_mac.mm
+++ b/src/gui/kernel/qcocoapanel_mac.mm
@@ -157,10 +157,11 @@ QT_USE_NAMESPACE
[self release];
}
-
- (BOOL)makeFirstResponder:(NSResponder *)responder
{
- if (responder == nil)
+ // For some reason Cocoa wants to flip the first responder
+ // when Qt doesn't want to, sorry, but "No" :-)
+ if (responder == nil && qApp->focusWidget())
return NO;
return [super makeFirstResponder:responder];
}
diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm
index ba121cd..e7b76a7 100644
--- a/src/gui/kernel/qcocoawindow_mac.mm
+++ b/src/gui/kernel/qcocoawindow_mac.mm
@@ -182,7 +182,9 @@ extern Qt::MouseButton cocoaButton2QtButton(NSInteger buttonNum); // qcocoaview.
- (BOOL)makeFirstResponder:(NSResponder *)responder
{
- if (responder == nil)
+ // For some reason Cocoa wants to flip the first responder
+ // when Qt doesn't want to, sorry, but "No" :-)
+ if (responder == nil && qApp->focusWidget())
return NO;
return [super makeFirstResponder:responder];
}