summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-04-30 10:37:37 (GMT)
committerRichard Moe Gustavsen <richard.gustavsen@nokia.com>2010-04-30 10:48:42 (GMT)
commit166ee307a5e2984ec0680f4a3774b557a462a2b4 (patch)
treed6eb9c936f06d0d12a429f6c9c13d52891a84f25 /src/gui
parentbd91e9bbfdbb3f389056b6af6b310b080db17ecb (diff)
downloadQt-166ee307a5e2984ec0680f4a3774b557a462a2b4.zip
Qt-166ee307a5e2984ec0680f4a3774b557a462a2b4.tar.gz
Qt-166ee307a5e2984ec0680f4a3774b557a462a2b4.tar.bz2
Cocoa: key events stopped working
If you have an empty toplevel widget, that widget will not receive key events anymore. Seems that we need to revert some parts of 90dfb5e5d8fc8cb841b0762cd88aa4b996c38312 Rev-By: denis
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_mac.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index d7cd2eb..e29b755 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -2300,6 +2300,12 @@ void QWidgetPrivate::finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ voidWin
if (q->testAttribute(Qt::WA_DropSiteRegistered))
registerDropSite(true);
transferChildren();
+
+ // Tell Cocoa explicit that we wan't the view to receive key events
+ // (regardless of focus policy) because this is how it works on other
+ // platforms (and in the carbon port):
+ if (!qApp->focusWidget())
+ [windowRef makeFirstResponder:nsview];
}
if (topExtra->posFromMove) {