summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 0bc57e0..0e378f9 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -1058,7 +1058,8 @@ static int qCocoaViewCount = 0;
{
// see the comment in the acceptsFirstResponder - if the window "stole" focus
// let it become the responder, but don't tell Qt
- if (!QApplication::focusWidget() && qwidget->focusPolicy() != Qt::NoFocus)
+ if (qwidget && qt_widget_private(qwidget->window())->topData()->embedded
+ && !QApplication::focusWidget() && qwidget->focusPolicy() != Qt::NoFocus)
qwidget->setFocus(Qt::OtherFocusReason);
return YES;
}