From 13e8b60d6c396b128cfd7338656d91ffbec8d170 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Thu, 19 Mar 2020 03:12:36 +0400 Subject: [PATCH] Don't recreate tray icon if it is disabled --- Telegram/SourceFiles/platform/linux/main_window_linux.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp index 3d30ef755..7b2e5d9ef 100644 --- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp @@ -531,6 +531,10 @@ void MainWindow::onSNIOwnerChanged( const QString &service, const QString &oldOwner, const QString &newOwner) { + if (Global::WorkMode().value() == dbiwmWindowOnly) { + return; + } + if (oldOwner.isEmpty() && !newOwner.isEmpty()) { LOG(("Switching to SNI tray icon...")); } else if (!oldOwner.isEmpty() && newOwner.isEmpty()) {