diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-01 03:02:15 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-10-01 03:02:15 +0200 |
commit | 79fb1089474514dbe1b25004df126d3194c952a8 (patch) | |
tree | 2cd05c05beffaa02a592c43b92b43dfca75b6db8 /src | |
parent | 91ed3e7c5800a6ef4bea9d0c4d80196f94caec95 (diff) | |
parent | 03e160cfd286bb336e875a180efd83635be7a27f (diff) |
Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib52352036df229b4047d0c19f713ae2436741993
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index e39ccf25e..a9da452dc 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -1158,7 +1158,18 @@ void QWaylandInputDevice::Keyboard::handleKey(ulong timestamp, QEvent::Type type } if (!filtered) { - QWindowSystemInterface::handleExtendedKeyEvent(focusWindow()->window(), timestamp, type, key, modifiers, + auto window = focusWindow()->window(); + + if (type == QEvent::KeyPress && key == Qt::Key_Menu) { + auto cursor = window->screen()->handle()->cursor(); + if (cursor) { + const QPoint globalPos = cursor->pos(); + const QPoint pos = window->mapFromGlobal(globalPos); + QWindowSystemInterface::handleContextMenuEvent(window, false, pos, globalPos, modifiers); + } + } + + QWindowSystemInterface::handleExtendedKeyEvent(window, timestamp, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorepeat, count); } } |