From 94b4809cdf8a5e701b34d5511060b0e637f69875 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Fri, 25 Nov 2022 16:53:34 +0400 Subject: [PATCH] Get XDG activation token also from DESKTOP_STARTUP_ID --- Telegram/SourceFiles/platform/linux/specific_linux.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index 6d39a2c48..93b5a5d9b 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -711,6 +711,11 @@ void start() { LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName())); + if (!qEnvironmentVariableIsSet("XDG_ACTIVATION_TOKEN") + && qEnvironmentVariableIsSet("DESKTOP_STARTUP_ID")) { + qputenv("XDG_ACTIVATION_TOKEN", qgetenv("DESKTOP_STARTUP_ID")); + } + qputenv("PULSE_PROP_application.name", AppName.utf8()); qputenv("PULSE_PROP_application.icon_name", base::IconName().toLatin1());