fix: Only handle menu button if our main window is currently active
All checks were successful
Code check / Check code (push) Successful in 1m52s
All checks were successful
Code check / Check code (push) Successful in 1m52s
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
@@ -2345,9 +2345,12 @@ class InputManager(QObject):
|
|||||||
|
|
||||||
self.button_event.emit(event.code, event.value)
|
self.button_event.emit(event.code, event.value)
|
||||||
# Special handling for menu on press only
|
# 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
|
if (event.value == 1 and event.code in BUTTONS['menu'] and
|
||||||
not self._is_gamescope_session and not self.in_guide_combination_attempt):
|
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:
|
elif event.type == ecodes.EV_ABS:
|
||||||
if event.code in {ecodes.ABS_Z, ecodes.ABS_RZ}:
|
if event.code in {ecodes.ABS_Z, ecodes.ABS_RZ}:
|
||||||
# Trigger handling for UI
|
# Trigger handling for UI
|
||||||
|
|||||||
Reference in New Issue
Block a user