mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
Merge pull request #14267 from humbletim/fb17479-fix-handshake-keyrelease
FB17479 - Fix scripted key release events for handshakes.
This commit is contained in:
commit
60b58977cd
2 changed files with 6 additions and 0 deletions
|
@ -4159,6 +4159,10 @@ void Application::focusOutEvent(QFocusEvent* event) {
|
|||
SpacemouseManager::getInstance().ManagerFocusOutEvent();
|
||||
#endif
|
||||
|
||||
synthesizeKeyReleasEvents();
|
||||
}
|
||||
|
||||
void Application::synthesizeKeyReleasEvents() {
|
||||
// synthesize events for keys currently pressed, since we may not get their release events
|
||||
// Because our key event handlers may manipulate _keysPressed, lets swap the keys pressed into a local copy,
|
||||
// clearing the existing list.
|
||||
|
@ -4784,6 +4788,7 @@ void Application::idle() {
|
|||
if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
|
||||
_keyboardMouseDevice->pluginFocusOutEvent();
|
||||
_keyboardDeviceHasFocus = false;
|
||||
synthesizeKeyReleasEvents();
|
||||
} else if (activeFocusItem == offscreenUi->getRootItem()) {
|
||||
_keyboardDeviceHasFocus = true;
|
||||
}
|
||||
|
|
|
@ -550,6 +550,7 @@ private:
|
|||
void keyReleaseEvent(QKeyEvent* event);
|
||||
|
||||
void focusOutEvent(QFocusEvent* event);
|
||||
void synthesizeKeyReleasEvents();
|
||||
void focusInEvent(QFocusEvent* event);
|
||||
|
||||
void mouseMoveEvent(QMouseEvent* event);
|
||||
|
|
Loading…
Reference in a new issue