History

Merge pull request #14267 from humbletim/fb17479-fix-handshake-keyrelease

FB17479 - Fix scripted key release events for handshakes.

Jamil Akram committed 7 years ago

Commit 60b58972 parents ef3acae d8217e92 files · +6 −0Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+5−0
@@ -4159,6 +4159,10 @@ void Application::focusOutEvent(QFocusEvent* event) { · 4158 unmodified lines
4159 SpacemouseManager::getInstance().ManagerFocusOutEvent();4159 SpacemouseManager::getInstance().ManagerFocusOutEvent();
4160#endif4160#endif
4161 4161
4162 synthesizeKeyReleasEvents();
4163}
4164
4165void Application::synthesizeKeyReleasEvents() {
4162 // synthesize events for keys currently pressed, since we may not get their release events4166 // synthesize events for keys currently pressed, since we may not get their release events
4163 // Because our key event handlers may manipulate _keysPressed, lets swap the keys pressed into a local copy,4167 // Because our key event handlers may manipulate _keysPressed, lets swap the keys pressed into a local copy,
4164 // clearing the existing list.4168 // clearing the existing list.
@@ -4784,6 +4788,7 @@ void Application::idle() { · 619 unmodified lines
4784 if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {4788 if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
4785 _keyboardMouseDevice->pluginFocusOutEvent();4789 _keyboardMouseDevice->pluginFocusOutEvent();
4786 _keyboardDeviceHasFocus = false;4790 _keyboardDeviceHasFocus = false;
4791 synthesizeKeyReleasEvents();
4787 } else if (activeFocusItem == offscreenUi->getRootItem()) {4792 } else if (activeFocusItem == offscreenUi->getRootItem()) {
4788 _keyboardDeviceHasFocus = true;4793 _keyboardDeviceHasFocus = true;
4789 }4794 }