summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcocoaview_mac.mm
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-03-18 13:40:43 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-03-18 13:46:08 (GMT)
commit371cab1c2da691c654b2f86a4cabfd4f74f6b170 (patch)
tree86c5899350ba2cbb823f31866c359687490182e8 /src/gui/kernel/qcocoaview_mac.mm
parent109efebab1420270d824fd419bf0b2f2cb9d01b9 (diff)
downloadQt-371cab1c2da691c654b2f86a4cabfd4f74f6b170.zip
Qt-371cab1c2da691c654b2f86a4cabfd4f74f6b170.tar.gz
Qt-371cab1c2da691c654b2f86a4cabfd4f74f6b170.tar.bz2
Fixed qmdiarea autotest regression on Cocoa
This is an addition to 4256bd2141fef53f9e69a51b966bd85f67a6cf54 - when Cocoa asks as to become first responder we should only tell Qt about it if we are embedded into Cocoa app and there is no Qt widget being focused. Reviewed-by: Prasanth
Diffstat (limited to 'src/gui/kernel/qcocoaview_mac.mm')
-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;
}