fix: dialog navigation on gamepad
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@@ -448,12 +448,12 @@ class InputManager(QObject):
|
|||||||
try:
|
try:
|
||||||
|
|
||||||
app = QApplication.instance()
|
app = QApplication.instance()
|
||||||
if not app or not self._parent.isActiveWindow():
|
|
||||||
return
|
|
||||||
active = QApplication.activeWindow()
|
active = QApplication.activeWindow()
|
||||||
focused = QApplication.focusWidget()
|
focused = QApplication.focusWidget()
|
||||||
popup = QApplication.activePopupWidget()
|
popup = QApplication.activePopupWidget()
|
||||||
modal_dialog = QApplication.activeModalWidget()
|
modal_dialog = QApplication.activeModalWidget()
|
||||||
|
if not app or not active:
|
||||||
|
return
|
||||||
|
|
||||||
# Handle Guide button to open system overlay
|
# Handle Guide button to open system overlay
|
||||||
if button_code in BUTTONS['guide']:
|
if button_code in BUTTONS['guide']:
|
||||||
@@ -1138,7 +1138,8 @@ class InputManager(QObject):
|
|||||||
|
|
||||||
# Проверка фокуса: игнорируем события, если окно не в фокусе
|
# Проверка фокуса: игнорируем события, если окно не в фокусе
|
||||||
app = QApplication.instance()
|
app = QApplication.instance()
|
||||||
if not app or not self._parent.isActiveWindow():
|
active = QApplication.activeWindow()
|
||||||
|
if not app or not active:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if event.type == ecodes.EV_KEY and event.value == 1:
|
if event.type == ecodes.EV_KEY and event.value == 1:
|
||||||
|
Reference in New Issue
Block a user