mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-29 15:01:03 +00:00
Fixed awesome WM tray icon.
This commit is contained in:
parent
067138f1bf
commit
64e9958585
@ -73,6 +73,8 @@ Type Compute() {
|
||||
return Type::KDE3;
|
||||
} else if (desktopSession.indexOf(qstr("xfce")) >= 0 || desktopSession == qstr("xubuntu")) {
|
||||
return Type::XFCE;
|
||||
} else if (desktopSession == qstr("awesome")) {
|
||||
return Type::Awesome;
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,6 +104,7 @@ Type ComputeAndLog() {
|
||||
case Type::Unity: return "Unity";
|
||||
case Type::XFCE: return "XFCE";
|
||||
case Type::Pantheon: return "Pantheon";
|
||||
case Type::Awesome: return "Awesome";
|
||||
}
|
||||
return QString::number(static_cast<int>(result));
|
||||
};
|
||||
@ -118,7 +121,7 @@ Type Get() {
|
||||
}
|
||||
|
||||
bool TryQtTrayIcon() {
|
||||
return !IsPantheon();
|
||||
return !IsPantheon() && !IsAwesome();
|
||||
}
|
||||
|
||||
bool PreferAppIndicatorTrayIcon() {
|
||||
|
@ -32,6 +32,7 @@ enum class Type {
|
||||
Unity,
|
||||
XFCE,
|
||||
Pantheon,
|
||||
Awesome,
|
||||
};
|
||||
|
||||
Type Get();
|
||||
@ -68,6 +69,10 @@ inline bool IsPantheon() {
|
||||
return Get() == Type::Pantheon;
|
||||
}
|
||||
|
||||
inline bool IsAwesome() {
|
||||
return Get() == Type::Awesome;
|
||||
}
|
||||
|
||||
bool TryQtTrayIcon();
|
||||
bool PreferAppIndicatorTrayIcon();
|
||||
bool TryUnityCounter();
|
||||
|
Loading…
Reference in New Issue
Block a user