From b036731b517903070e4e6fe7ab7688405cb638ed Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Fri, 8 Aug 2025 23:43:26 +0200 Subject: [PATCH] Hide Steam info when not needed --- dashboard/qml/Main.qml | 5 +++-- server/main.cpp | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/dashboard/qml/Main.qml b/dashboard/qml/Main.qml index e3e14a0b..4854befe 100644 --- a/dashboard/qml/Main.qml +++ b/dashboard/qml/Main.qml @@ -305,11 +305,12 @@ Kirigami.ApplicationWindow { level: 1 wrapMode: Text.WordWrap text: i18n("Steam information") - opacity: root.server_started + opacity: steam_info.opacity Layout.maximumHeight: root.server_started ? -1 : 0 } SteamLaunchOptions { - opacity: root.server_started + id: steam_info + opacity: root.server_started && WivrnServer.steamCommand != "" Layout.maximumHeight: root.server_started ? -1 : 0 } diff --git a/server/main.cpp b/server/main.cpp index ae4914fe..610ddfba 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -678,14 +678,18 @@ void on_json_configuration(WivrnServer * server, const GParamSpec * pspec, gpoin std::filesystem::path config_new = config; config_new += ".new"; - std::ofstream file(config_new); - file.write(json, strlen(json)); + { + std::ofstream file(config_new); + file.write(json, strlen(json)); + } std::error_code ec; std::filesystem::rename(config_new, config, ec); if (ec) std::cerr << "Failed to save configuration: " << ec.message() << std::endl; + + wivrn_server_set_steam_command(dbus_server, steam_command().c_str()); } void expose_known_keys_on_dbus()