From 3ef433af0c9d26961480da76578b84a7012f28b3 Mon Sep 17 00:00:00 2001 From: Boris Yumankulov Date: Mon, 1 Dec 2025 12:08:55 +0500 Subject: [PATCH] fix: Only handle menu button if our main window is currently active Signed-off-by: Boris Yumankulov --- portprotonqt/input_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/portprotonqt/input_manager.py b/portprotonqt/input_manager.py index 0b829c7..15cf9c5 100644 --- a/portprotonqt/input_manager.py +++ b/portprotonqt/input_manager.py @@ -2345,9 +2345,12 @@ class InputManager(QObject): self.button_event.emit(event.code, event.value) # Special handling for menu on press only + # Only handle menu button if our main window is currently active if (event.value == 1 and event.code in BUTTONS['menu'] and not self._is_gamescope_session and not self.in_guide_combination_attempt): - self.toggle_fullscreen.emit(not self._is_fullscreen) + # Check if our main window is the currently active window + if self._parent.isActiveWindow(): + self.toggle_fullscreen.emit(not self._is_fullscreen) elif event.type == ecodes.EV_ABS: if event.code in {ecodes.ABS_Z, ecodes.ABS_RZ}: # Trigger handling for UI