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

Change-Id: I78da93b3045a65ae0024ac232b9eaa79bc1fe3e7
This commit is contained in:
Johan Klokkhammer Helsing 2019-10-01 15:33:50 +02:00
commit a5ecdff181
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