From 7fc1264b6507e96e98d3791bda6140b9675e8a3d Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 9 Oct 2026 03:27:07 +0900 Subject: [PATCH] fix: false positive when Flatpak client is running The process ultimately spawned from the Flatpak run command has the same process name as the one expected for STEAM_CMD (essentially just the Steam client wrapped in a Flatpak), so the old logic would return True for is_steam_running() if the Flatpak version had already been launched. To prevent unintended collisions and isolate launch parameters, STEAM_CMD and FLATPAK_RUN_CMD/FLATPAK_SANDBOX should be mutually exclusive. --- dzgui/init/proc.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dzgui/init/proc.py b/dzgui/init/proc.py index ca9a243..9be760f 100644 --- a/dzgui/init/proc.py +++ b/dzgui/init/proc.py @@ -16,12 +16,15 @@ logger = logging.getLogger(APP_NAME) def is_steam_running(cmd: str) -> bool: - if cmd == STEAM_CMD: + is_flatpak_running = is_flatpak_steam_running() + if cmd in (FLATPAK_RUN_CMD, FLATPAK_SANDBOX): + return is_flatpak_running + elif cmd == STEAM_CMD: + if is_flatpak_running: + return False if has_cmd(STEAM_CMD) is False: return False return is_running(STEAM_CMD) - elif cmd in (FLATPAK_RUN_CMD, FLATPAK_SANDBOX): - return is_flatpak_steam_running() else: raise TypeError("Not a valid Steam client selection")