mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Update SNI state even if tray is deactivated
This commit is contained in:
@@ -568,6 +568,13 @@ void MainWindow::handleSNIOwnerChanged(
|
|||||||
const QString &service,
|
const QString &service,
|
||||||
const QString &oldOwner,
|
const QString &oldOwner,
|
||||||
const QString &newOwner) {
|
const QString &newOwner) {
|
||||||
|
SNIAvailable = !newOwner.isEmpty();
|
||||||
|
|
||||||
|
const auto trayAvailable = SNIAvailable
|
||||||
|
|| QSystemTrayIcon::isSystemTrayAvailable();
|
||||||
|
|
||||||
|
Platform::SetTrayIconSupported(trayAvailable);
|
||||||
|
|
||||||
if (Global::WorkMode().value() == dbiwmWindowOnly) {
|
if (Global::WorkMode().value() == dbiwmWindowOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -586,13 +593,6 @@ void MainWindow::handleSNIOwnerChanged(
|
|||||||
}
|
}
|
||||||
trayIcon = nullptr;
|
trayIcon = nullptr;
|
||||||
|
|
||||||
SNIAvailable = !newOwner.isEmpty();
|
|
||||||
|
|
||||||
const auto trayAvailable = SNIAvailable
|
|
||||||
|| QSystemTrayIcon::isSystemTrayAvailable();
|
|
||||||
|
|
||||||
Platform::SetTrayIconSupported(trayAvailable);
|
|
||||||
|
|
||||||
if (trayAvailable) {
|
if (trayAvailable) {
|
||||||
psSetupTrayIcon();
|
psSetupTrayIcon();
|
||||||
} else {
|
} else {
|
||||||
|
@@ -85,7 +85,7 @@ constexpr auto kXCBFrameExtentsAtomName = "_GTK_FRAME_EXTENTS"_cs;
|
|||||||
|
|
||||||
QStringList PlatformThemes;
|
QStringList PlatformThemes;
|
||||||
|
|
||||||
bool IsTrayIconSupported = true;
|
bool IsTrayIconSupported = false;
|
||||||
|
|
||||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||||
void PortalAutostart(bool autostart, bool silent = false) {
|
void PortalAutostart(bool autostart, bool silent = false) {
|
||||||
|
Reference in New Issue
Block a user