From 9f32afe6a37f7288140e837e8930715675bc136f Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Sat, 13 Sep 2025 21:30:57 +0500 Subject: [PATCH] fix: dialog navigation on gamepad Signed-off-by: Boris Yumankulov --- portprotonqt/input_manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/portprotonqt/input_manager.py b/portprotonqt/input_manager.py index b87f62f..1e6d918 100644 --- a/portprotonqt/input_manager.py +++ b/portprotonqt/input_manager.py @@ -448,12 +448,12 @@ class InputManager(QObject): try: app = QApplication.instance() - if not app or not self._parent.isActiveWindow(): - return active = QApplication.activeWindow() focused = QApplication.focusWidget() popup = QApplication.activePopupWidget() modal_dialog = QApplication.activeModalWidget() + if not app or not active: + return # Handle Guide button to open system overlay if button_code in BUTTONS['guide']: @@ -1138,7 +1138,8 @@ class InputManager(QObject): # Проверка фокуса: игнорируем события, если окно не в фокусе app = QApplication.instance() - if not app or not self._parent.isActiveWindow(): + active = QApplication.activeWindow() + if not app or not active: continue if event.type == ecodes.EV_KEY and event.value == 1: