From 565dc49f365f10473cc1313b999c303062a87ff5 Mon Sep 17 00:00:00 2001
From: Boris Yumankulov <boria138@altlinux.org>
Date: Fri, 6 Jun 2025 13:23:55 +0500
Subject: [PATCH] fix(input_manager): prevent game launch when AddGameDialog is
 open

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
---
 portprotonqt/input_manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/portprotonqt/input_manager.py b/portprotonqt/input_manager.py
index a3aa38b..1d9da42 100644
--- a/portprotonqt/input_manager.py
+++ b/portprotonqt/input_manager.py
@@ -153,7 +153,7 @@ class InputManager(QObject):
                     return
 
             # Game launch on detail page
-            if (button_code in BUTTONS['confirm'] or button_code in BUTTONS['confirm_stick']) and self._parent.currentDetailPage is not None:
+            if (button_code in BUTTONS['confirm'] or button_code in BUTTONS['confirm_stick']) and self._parent.currentDetailPage is not None and self._parent.current_add_game_dialog is None:
                 if self._parent.current_exec_line:
                     self._parent.toggleGame(self._parent.current_exec_line, None)
                     return