summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSamuel Gaist <samuel.gaist@edeltech.ch>2013-11-08 22:50:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-12-05 21:31:27 +0100
commit894983bea2314c2251a10b0924259a6a58c996ef (patch)
treea06ffeff8e305dff72ff4a4bbd445a4bed1eb052 /src/gui
parent1d24a83365c2360c064563c15cb09ec8e5f6670a (diff)
Use qt_mac_effectiveview_for for setFocus_sys
Currently setFocus_sys use qt_mac_nativeview_for to set the focus which triggers a bug rerouting the key events through NSMenu rather that directly to the correct widget. Get the effective id returns the correct widget. This changeset applies the patch proposed in the bug report Task-number: QTBUG-34371 Change-Id: I0831f41ca409ff309954bb45a50975dd4eb1406a Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_mac.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index e99dabff93..9985430748 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -3916,7 +3916,7 @@ void QWidgetPrivate::setFocus_sys()
if (q->testAttribute(Qt::WA_WState_Created)) {
#ifdef QT_MAC_USE_COCOA
QMacCocoaAutoReleasePool pool;
- NSView *view = qt_mac_nativeview_for(q);
+ NSView *view = qt_mac_effectiveview_for(q);
[[view window] makeFirstResponder:view];
#else
SetKeyboardFocus(qt_mac_window_for(q), qt_mac_nativeview_for(q), 1);