diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-04-30 10:37:37 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-04-30 10:48:42 (GMT) |
commit | 166ee307a5e2984ec0680f4a3774b557a462a2b4 (patch) | |
tree | d6eb9c936f06d0d12a429f6c9c13d52891a84f25 /src/gui | |
parent | bd91e9bbfdbb3f389056b6af6b310b080db17ecb (diff) | |
download | Qt-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.mm | 6 |
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) { |