Merge remote-tracking branch 'origin/5.14' into 5.15

Change-Id: Ib52352036df229b4047d0c19f713ae2436741993
This commit is contained in:
Qt Forward Merge Bot 2019-10-01 03:02:15 +02:00
commit 9ae85568d8
2 changed files with 13 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -1,4 +1,4 @@
include (../shared_old/shared_old.pri)
TARGET = tst_client_fullscreenshell1
TARGET = tst_client_fullscreenshellv1
SOURCES += tst_fullscreenshellv1.cpp