1
0
telegram-desktop/0000-gtk2-default.patch

38 lines
1.8 KiB
Diff
Raw Normal View History

diff --git a/Telegram/SourceFiles/platform/linux/linux_libs.cpp b/Telegram/SourceFiles/platform/linux/linux_libs.cpp
index 5071d63..f8c0f20 100644
--- a/Telegram/SourceFiles/platform/linux/linux_libs.cpp
+++ b/Telegram/SourceFiles/platform/linux/linux_libs.cpp
@@ -237,15 +237,15 @@ void start() {
bool indicatorLoaded = false;
bool isWayland = QGuiApplication::platformName().startsWith(qsl("wayland"), Qt::CaseInsensitive);
QLibrary lib_gtk, lib_indicator;
- if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
- if (loadLibrary(lib_gtk, "gtk-3", 0)) {
+ if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) {
+ if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
indicatorLoaded = setupAppIndicator(lib_indicator);
}
}
if ((!gtkLoaded || !indicatorLoaded) && !isWayland) {
- if (loadLibrary(lib_indicator, "ayatana-appindicator", 1) || loadLibrary(lib_indicator, "appindicator", 1)) {
- if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
+ if (loadLibrary(lib_indicator, "ayatana-appindicator3", 1) || loadLibrary(lib_indicator, "appindicator3", 1)) {
+ if (loadLibrary(lib_gtk, "gtk-3", 0)) {
gtkLoaded = indicatorLoaded = false;
gtkLoaded = setupGtkBase(lib_gtk);
indicatorLoaded = setupAppIndicator(lib_indicator);
@@ -255,10 +255,10 @@ void start() {
// If no appindicator, try at least load gtk.
if (!gtkLoaded && !indicatorLoaded) {
- if (loadLibrary(lib_gtk, "gtk-3", 0)) {
+ if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
}
- if (!gtkLoaded && !isWayland && loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) {
+ if (!gtkLoaded && !isWayland && loadLibrary(lib_gtk, "gtk-3", 0)) {
gtkLoaded = setupGtkBase(lib_gtk);
}
}