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.
This commit is contained in:
aclist committed 2026-10-09 04:02:58 +09:00
1 parent f748b09ba7
commit 7fc1264b65
1 file changed
+6 -3
+6 -3
View File
@@ -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")