From b42f476f5653f4f5d2992f7882ba4da8d9ac9dd9 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Fri, 4 Jul 2025 12:08:43 +0500 Subject: [PATCH] fix(input_manager): prevent game launch when any modal dialog is open Signed-off-by: Boris Yumankulov --- portprotonqt/input_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/portprotonqt/input_manager.py b/portprotonqt/input_manager.py index 7ad7030..0f64552 100644 --- a/portprotonqt/input_manager.py +++ b/portprotonqt/input_manager.py @@ -369,6 +369,7 @@ class InputManager(QObject): active = QApplication.activeWindow() focused = QApplication.focusWidget() popup = QApplication.activePopupWidget() + modal_dialog = QApplication.activeModalWidget() # Handle Guide button to open system overlay if button_code in BUTTONS['guide']: @@ -460,7 +461,7 @@ class InputManager(QObject): return # Game launch on detail page - if (button_code in BUTTONS['confirm']) and self._parent.currentDetailPage is not None and self._parent.current_add_game_dialog is None: + if (button_code in BUTTONS['confirm']) and self._parent.currentDetailPage is not None and modal_dialog is None: if self._parent.current_exec_line: self.trigger_rumble() self._parent.toggleGame(self._parent.current_exec_line, None)