From ee6122b97d042e8bb50531511d6c0103e0d6a358 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 14 Feb 2024 17:49:52 -0500 Subject: restart ui by killing webhelper this cleanly reloads the ui, prevents memory leaks, and won't break the toasts --- backend/decky_loader/localplatform/localplatformlinux.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'backend/decky_loader/localplatform/localplatformlinux.py') diff --git a/backend/decky_loader/localplatform/localplatformlinux.py b/backend/decky_loader/localplatform/localplatformlinux.py index 68717bcf..4eb112ee 100644 --- a/backend/decky_loader/localplatform/localplatformlinux.py +++ b/backend/decky_loader/localplatform/localplatformlinux.py @@ -156,6 +156,10 @@ async def service_start(service_name : str) -> bool: res = run(cmd, stdout=PIPE, stderr=STDOUT) return res.returncode == 0 +async def restart_webhelper() -> bool: + res = run(["killall", "-s", "SIGTERM", "steamwebhelper"], stdout=DEVNULL, stderr=DEVNULL) + return res.returncode == 0 + def get_privileged_path() -> str: path = os.getenv("PRIVILEGED_PATH") -- cgit v1.2.3