Showing the changes to interface/src/Application.cpp (1 of 7 files). Show all
Unified · Split
| @@ -4574,11 +4574,14 @@ void Application::idle() { · 4573 unmodified lines | |||
| 4574 | _lastTimeUpdated.start(); | 4574 | _lastTimeUpdated.start(); |
| 4575 | 4575 | ||
| 4576 | // If the offscreen Ui has something active that is NOT the root, then assume it has keyboard focus. | 4576 | // If the offscreen Ui has something active that is NOT the root, then assume it has keyboard focus. |
| 4577 | if (_keyboardDeviceHasFocus && offscreenUi && offscreenUi->getWindow()->activeFocusItem() != offscreenUi->getRootItem()) { | 4577 | if (offscreenUi && offscreenUi->getWindow()) { |
| 4578 | _keyboardMouseDevice->pluginFocusOutEvent(); | 4578 | auto activeFocusItem = offscreenUi->getWindow()->activeFocusItem(); |
| 4579 | _keyboardDeviceHasFocus = false; | 4579 | if (_keyboardDeviceHasFocus && activeFocusItem != offscreenUi->getRootItem()) { |
| 4580 | } else if (offscreenUi && offscreenUi->getWindow()->activeFocusItem() == offscreenUi->getRootItem()) { | 4580 | _keyboardMouseDevice->pluginFocusOutEvent(); |
| 4581 | _keyboardDeviceHasFocus = true; | 4581 | _keyboardDeviceHasFocus = false; |
| 4582 | } else if (activeFocusItem == offscreenUi->getRootItem()) { | ||
| 4583 | _keyboardDeviceHasFocus = true; | ||
| 4584 | } | ||
| 4582 | } | 4585 | } |
| 4583 | 4586 | ||
| 4584 | checkChangeCursor(); | 4587 | checkChangeCursor(); |