diff --git a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp index af3bf0d05..e3af76c18 100644 --- a/Telegram/SourceFiles/platform/linux/launcher_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/launcher_linux.cpp @@ -64,25 +64,6 @@ int Launcher::exec() { void Launcher::initHook() { QApplication::setAttribute(Qt::AA_DisableSessionManager, true); - QApplication::setDesktopFileName([] { - if (!Core::UpdaterDisabled() && !cExeName().isEmpty()) { - const auto appimagePath = qsl("file://%1%2").arg( - cExeDir(), - cExeName()).toUtf8(); - - char md5Hash[33] = { 0 }; - hashMd5Hex( - appimagePath.constData(), - appimagePath.size(), - md5Hash); - - return qsl("appimagekit_%1-%2.desktop").arg( - md5Hash, - AppName.utf16().replace(' ', '_')); - } - - return qsl(QT_STRINGIFY(TDESKTOP_LAUNCHER_BASENAME) ".desktop"); - }()); } bool Launcher::launchUpdater(UpdaterLaunch action) { diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp index a96a85e96..fd9118bdd 100644 --- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp @@ -488,6 +488,26 @@ int psFixPrevious() { namespace Platform { void start() { + QGuiApplication::setDesktopFileName([] { + if (!Core::UpdaterDisabled() && !cExeName().isEmpty()) { + const auto appimagePath = qsl("file://%1%2").arg( + cExeDir(), + cExeName()).toUtf8(); + + char md5Hash[33] = { 0 }; + hashMd5Hex( + appimagePath.constData(), + appimagePath.size(), + md5Hash); + + return qsl("appimagekit_%1-%2.desktop").arg( + md5Hash, + AppName.utf16().replace(' ', '_')); + } + + return qsl(QT_STRINGIFY(TDESKTOP_LAUNCHER_BASENAME) ".desktop"); + }()); + LOG(("Launcher filename: %1").arg(QGuiApplication::desktopFileName())); qputenv("PULSE_PROP_application.name", AppName.utf8());