From ff3c8ad414be9f5a37d3965e483659dcbf6979b5 Mon Sep 17 00:00:00 2001 From: leia uwu Date: Tue, 14 Apr 2026 15:33:11 -0300 Subject: [PATCH] frontend: call setDesktopFileName earlier Qt 6.10.1+ will register the dbus app ID when outside a sandbox, but that requires the desktop file name to be set earlier This fixes portal dialogs using Qt dbus having the wrong app name when launching OBS e.g via a terminal / not through the desktop file see https://github.com/leia-uwu/obs-wayland-hotkeys/issues/5 --- frontend/OBSApp.cpp | 1 - frontend/obs-main.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/OBSApp.cpp b/frontend/OBSApp.cpp index 6ade93c5d7ad95..822ed4d036d2f9 100644 --- a/frontend/OBSApp.cpp +++ b/frontend/OBSApp.cpp @@ -928,7 +928,6 @@ OBSApp::OBSApp(int &argc, char **argv, profiler_name_store_t *store) setWindowIcon(QIcon::fromTheme("obs", QIcon(":/res/images/obs.png"))); #endif - setDesktopFileName("com.obsproject.Studio"); pluginManager_ = std::make_unique(); } diff --git a/frontend/obs-main.cpp b/frontend/obs-main.cpp index 93601058f7bf23..b2c352def56c61 100644 --- a/frontend/obs-main.cpp +++ b/frontend/obs-main.cpp @@ -505,6 +505,7 @@ static int run_program(fstream &logFile, int argc, char *argv[]) #ifdef _WIN32 QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif + QGuiApplication::setDesktopFileName("com.obsproject.Studio"); QCoreApplication::addLibraryPath(".");