fix(input_manager): prevent game launch when any modal dialog is open
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@ -369,6 +369,7 @@ class InputManager(QObject):
|
|||||||
active = QApplication.activeWindow()
|
active = QApplication.activeWindow()
|
||||||
focused = QApplication.focusWidget()
|
focused = QApplication.focusWidget()
|
||||||
popup = QApplication.activePopupWidget()
|
popup = QApplication.activePopupWidget()
|
||||||
|
modal_dialog = QApplication.activeModalWidget()
|
||||||
|
|
||||||
# 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']:
|
||||||
@ -460,7 +461,7 @@ class InputManager(QObject):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Game launch on detail page
|
# 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:
|
if self._parent.current_exec_line:
|
||||||
self.trigger_rumble()
|
self.trigger_rumble()
|
||||||
self._parent.toggleGame(self._parent.current_exec_line, None)
|
self._parent.toggleGame(self._parent.current_exec_line, None)
|
||||||
|
Reference in New Issue
Block a user