From 798374531778456011e4687284005c9fd72bbf44 Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Wed, 6 Nov 2024 10:45:33 +0100 Subject: [PATCH] Attempt flatpak-spawn if permission is granted --- dashboard/adb.cpp | 2 +- dashboard/steam_app.cpp | 2 +- server/start_application.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/adb.cpp b/dashboard/adb.cpp index 89054a2a..6585327c 100644 --- a/dashboard/adb.cpp +++ b/dashboard/adb.cpp @@ -33,7 +33,7 @@ std::unique_ptr escape_sandbox(const std::string & executable, Args && auto process = std::make_unique(); QStringList args; - if (wivrn::is_flatpak()) + if (wivrn::flatpak_key("org.freedesktop.Flatpak") == "talk") { process->setProgram("flatpak-spawn"); args.push_back("--host"); diff --git a/dashboard/steam_app.cpp b/dashboard/steam_app.cpp index 1490c90f..7b14385c 100644 --- a/dashboard/steam_app.cpp +++ b/dashboard/steam_app.cpp @@ -35,7 +35,7 @@ std::string read_vr_manifest() std::filesystem::path vrmanifest = std::string{home ? home : ""} + "/.steam/steam/config/steamapps.vrmanifest"; - if (wivrn::is_flatpak()) + if (wivrn::flatpak_key("org.freedesktop.Flatpak") == "talk") { QProcess flatpak_spawn; flatpak_spawn.start("flatpak-spawn", {"--host", "cat", QString::fromStdString(vrmanifest)}); diff --git a/server/start_application.cpp b/server/start_application.cpp index 6a8c2efa..576d9903 100644 --- a/server/start_application.cpp +++ b/server/start_application.cpp @@ -235,7 +235,7 @@ int wivrn::exec_application(configuration config) std::string executable; std::vector args; - if (is_flatpak()) + if (flatpak_key("org.freedesktop.Flatpak") == "talk") { executable = "flatpak-spawn"; args.push_back("flatpak-spawn");