mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:28:37 +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();
|
SpacemouseManager::getInstance().ManagerFocusOutEvent();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
synthesizeKeyReleasEvents();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Application::synthesizeKeyReleasEvents() {
|
||||||
// synthesize events for keys currently pressed, since we may not get their release events
|
// 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,
|
// Because our key event handlers may manipulate _keysPressed, lets swap the keys pressed into a local copy,
|
||||||
// clearing the existing list.
|
// clearing the existing list.
|
||||||
|
@ -4784,6 +4788,7 @@ void Application::idle() {
|
||||||
if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
|
if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
|
||||||
_keyboardMouseDevice->pluginFocusOutEvent();
|
_keyboardMouseDevice->pluginFocusOutEvent();
|
||||||
_keyboardDeviceHasFocus = false;
|
_keyboardDeviceHasFocus = false;
|
||||||
|
synthesizeKeyReleasEvents();
|
||||||
} else if (activeFocusItem == offscreenUi->getRootItem()) {
|
} else if (activeFocusItem == offscreenUi->getRootItem()) {
|
||||||
_keyboardDeviceHasFocus = true;
|
_keyboardDeviceHasFocus = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,6 +550,7 @@ private:
|
||||||
void keyReleaseEvent(QKeyEvent* event);
|
void keyReleaseEvent(QKeyEvent* event);
|
||||||
|
|
||||||
void focusOutEvent(QFocusEvent* event);
|
void focusOutEvent(QFocusEvent* event);
|
||||||
|
void synthesizeKeyReleasEvents();
|
||||||
void focusInEvent(QFocusEvent* event);
|
void focusInEvent(QFocusEvent* event);
|
||||||
|
|
||||||
void mouseMoveEvent(QMouseEvent* event);
|
void mouseMoveEvent(QMouseEvent* event);
|
||||||
|
|
Loading…
Reference in a new issue