call focusOutEvent on keyboard input plugin when an offscreen ui has activeFocus.
Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -2564,6 +2564,15 @@ void Application::idle(uint64_t now) { · 2563 unmodified lines | ||
| 2564 | 2564 | _overlayConductor.setEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Overlays)); |
| 2565 | 2565 | } |
| 2566 | 2566 | |
| 2567 | + // If the offscreen Ui has something active that is NOT the root, then assume it has keyboard focus. | |
| 2568 | + auto offscreenUi = DependencyManager::get<OffscreenUi>(); | |
| 2569 | + if (_keyboardDeviceHasFocus && offscreenUi && offscreenUi->getWindow()->activeFocusItem() != offscreenUi->getRootItem()) { | |
| 2570 | + _keyboardMouseDevice->pluginFocusOutEvent(); | |
| 2571 | + _keyboardDeviceHasFocus = false; | |
| 2572 | + } else if (offscreenUi && offscreenUi->getWindow()->activeFocusItem() == offscreenUi->getRootItem()) { | |
| 2573 | + _keyboardDeviceHasFocus = true; | |
| 2574 | + } | |
| 2575 | + | |
| 2567 | 2576 | auto displayPlugin = getActiveDisplayPlugin(); |
| 2568 | 2577 | // depending on whether we're throttling or not. |
| 2569 | 2578 | // Once rendering is off on another thread we should be able to have Application::idle run at start(0) in |