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
41594159 SpacemouseManager::getInstance().ManagerFocusOutEvent();
41604160 #endif
41614161
4162+ synthesizeKeyReleasEvents();
4163+}
4164+
4165+void Application::synthesizeKeyReleasEvents() {
41624166 // synthesize events for keys currently pressed, since we may not get their release events
41634167 // Because our key event handlers may manipulate _keysPressed, lets swap the keys pressed into a local copy,
41644168 // clearing the existing list.
@@ -4784,6 +4788,7 @@ void Application::idle() { · 619 unmodified lines
47844788 if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) {
47854789 _keyboardMouseDevice->pluginFocusOutEvent();
47864790 _keyboardDeviceHasFocus = false;
4791+ synthesizeKeyReleasEvents();
47874792 } else if (activeFocusItem == offscreenUi->getRootItem()) {
47884793 _keyboardDeviceHasFocus = true;
47894794 }