diff --git a/0003-prioritize-gtk2.patch b/0003-prioritize-gtk2.patch new file mode 100644 index 0000000..b5d953a --- /dev/null +++ b/0003-prioritize-gtk2.patch @@ -0,0 +1,19 @@ +diff --git a/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration.cpp b/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration.cpp +index bafd075..315bab7 100644 +--- a/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration.cpp ++++ b/Telegram/lib_base/base/platform/linux/base_linux_gtk_integration.cpp +@@ -239,12 +239,12 @@ void GtkIntegration::load() { + DEBUG_LOG(("Icon theme: %1").arg(QIcon::themeName())); + DEBUG_LOG(("Fallback icon theme: %1").arg(QIcon::fallbackThemeName())); + +- if (LoadGtkLibrary(_lib, "gtk-3", 0)) { ++ if (LoadGtkLibrary(_lib, "gtk-x11-2.0", 0)) { + Loaded = SetupGtkBase(_lib); + } + if (!Loaded + && !TriedToInit +- && LoadGtkLibrary(_lib, "gtk-x11-2.0", 0)) { ++ && LoadGtkLibrary(_lib, "gtk-3", 0)) { + Loaded = SetupGtkBase(_lib); + } + diff --git a/telegram-desktop.changes b/telegram-desktop.changes index 3bf76fd..f543561 100644 --- a/telegram-desktop.changes +++ b/telegram-desktop.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jun 5 03:02:08 UTC 2021 - Xu Zhao + +- Add 0003-priortize-gtk2.patch and enable GTK integration. + Fixes boo#1149986 regression. + ------------------------------------------------------------------- Fri May 28 10:41:04 UTC 2021 - Marcel Kuehlhorn diff --git a/telegram-desktop.spec b/telegram-desktop.spec index e6f6bbf..0d6183b 100644 --- a/telegram-desktop.spec +++ b/telegram-desktop.spec @@ -43,6 +43,8 @@ Source1: tg_owt-master.zip Patch1: 0001-use-bundled-ranged-exptected-gsl.patch # PATCH-FIX-OPENSUSE Patch2: 0002-tg_owt-fix-name-confliction.patch +# PATCH-FIX-OPENSUSE boo#1149986 +Patch3: 0003-prioritize-gtk2.patch # There is an (incomplete) patch available for part of the source: # https://github.com/desktop-app/lib_base.git 3582bca53a1e195a31760978dc41f67ce44fc7e4 # but tdesktop itself still falls short, and it looks to be something @@ -72,6 +74,7 @@ BuildRequires: libwebrtc_audio_processing-devel BuildRequires: ninja BuildRequires: pkgconfig BuildRequires: unzip +BuildRequires: webkit2gtk3-devel BuildRequires: xorg-x11-devel BuildRequires: xxhash-devel BuildRequires: xz @@ -153,6 +156,7 @@ The service also provides APIs to independent developers. %prep %setup -q -n tdesktop-%{version}-full %patch1 -p2 +%patch3 -p1 cd ../ unzip -q %{S:1} @@ -198,8 +202,7 @@ cd %{_builddir}/tdesktop-%{version}-full -DDESKTOP_APP_USE_PACKAGED_FONTS=ON \ -DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \ -DTDESKTOP_LAUNCHER_BASENAME=%{name} \ - -DDESKTOP_APP_SPECIAL_TARGET="" \ - -DDESKTOP_APP_DISABLE_GTK_INTEGRATION=ON + -DDESKTOP_APP_SPECIAL_TARGET="" %cmake_build