commit a7423cdb2efb4d929270225e60f625a6440c8880
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Thu Mar 26 12:56:57 2020 +0100
Backported upstream patch with tray icon fix.
telegram-desktop-13e8b60.patch | 24 ++++++++++++++++++++++++
telegram-desktop.spec | 11 +++++++----
2 files changed, 31 insertions(+), 4 deletions(-)
---
diff --git a/telegram-desktop-13e8b60.patch b/telegram-desktop-13e8b60.patch
new file mode 100644
index 0000000..604f0a2
--- /dev/null
+++ b/telegram-desktop-13e8b60.patch
@@ -0,0 +1,24 @@
+From 13e8b60d6c396b128cfd7338656d91ffbec8d170 Mon Sep 17 00:00:00 2001
+From: Ilya Fedin <fedin-ilja2010(a)ya.ru>
+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 3d30ef755c..7b2e5d9efe 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()) {
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 33bb923..a01646e 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -28,7 +28,7 @@
Name: telegram-desktop
Version: 1.9.21
-Release: 3%{?dist}
+Release: 4%{?dist}
# Application and 3rd-party modules licensing:
# * Telegram Desktop - GPLv3+ with OpenSSL exception -- main tarball;
@@ -42,6 +42,9 @@ ExclusiveArch: x86_64
# Source files...
Source0: %{url}/releases/download/v%{version}/%{appname}-%{version}%{tarsuffix}.tar.gz
+#
https://github.com/telegramdesktop/tdesktop/commit/13e8b60d6c396b128cfd73...
+Patch100: %{name}-13e8b60.patch
+
# Telegram Desktop require exact version of Qt due to Qt private API usage.
%{?_qt5:Requires: %{_qt5}%{?_isa} = %{_qt5_version}}
Requires: qt5-qtimageformats%{?_isa}
@@ -205,11 +208,11 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/%{launcher}.desktop
%{_metainfodir}/%{launcher}.appdata.xml
%changelog
+* Thu Mar 26 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.9.21-4
+- Backported upstream patch with tray icon fix.
+
* Mon Mar 23 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.9.21-3
- Disabled aarch64 and ppc64le again due to not enough RAM on builders.
* Mon Mar 23 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.9.21-2
- Enabled aarch64 and ppc64le architectures.
-
-* Tue Mar 17 2020 Vitaly Zaitsev <vitaly(a)easycoding.org> - 1.9.21-1
-- Updated to version 1.9.21.