mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-01 17:57:51 +00:00
Loading libunity only in Unity and Pantheon. #3053
Commit 296c800b39 introduced a regression which caused crashes
in some ArchLinux distros when attempting to load or use libunity.
This commit is contained in:
@@ -23,6 +23,7 @@ Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
||||
|
||||
#include "styles/style_window.h"
|
||||
#include "platform/linux/linux_libs.h"
|
||||
#include "platform/linux/linux_desktop_environment.h"
|
||||
#include "platform/platform_notifications_manager.h"
|
||||
#include "mainwindow.h"
|
||||
#include "application.h"
|
||||
@@ -377,9 +378,9 @@ bool MainWindow::psHasNativeNotifications() {
|
||||
}
|
||||
|
||||
void MainWindow::LibsLoaded() {
|
||||
QStringList cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower().split(':');
|
||||
noQtTrayIcon = (cdesktop.contains(qstr("pantheon"))) || (cdesktop.contains(qstr("gnome")));
|
||||
tryAppIndicator = (cdesktop.contains(qstr("xfce")) || cdesktop.contains(qstr("unity")));
|
||||
auto cdesktop = Libs::CurrentDesktopStrings();
|
||||
noQtTrayIcon = !DesktopEnvironment::TryQtTrayIcon();
|
||||
tryAppIndicator = !DesktopEnvironment::PreferAppIndicatorTrayIcon();
|
||||
|
||||
if (noQtTrayIcon) cSetSupportTray(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user