Don't remove SNI object when SNI is lost
This commit is contained in:
parent
e71b7dd384
commit
a1a7399023
|
@ -451,7 +451,7 @@ void MainWindow::initHook() {
|
|||
|
||||
bool MainWindow::hasTrayIcon() const {
|
||||
#ifndef TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
return trayIcon || _sniTrayIcon;
|
||||
return trayIcon || (SNIAvailable && _sniTrayIcon);
|
||||
#else
|
||||
return trayIcon;
|
||||
#endif // !TDESKTOP_DISABLE_DBUS_INTEGRATION
|
||||
|
@ -545,12 +545,6 @@ void MainWindow::onSNIOwnerChanged(
|
|||
return;
|
||||
}
|
||||
|
||||
if (_sniTrayIcon) {
|
||||
_sniTrayIcon->setContextMenu(0);
|
||||
_sniTrayIcon->deleteLater();
|
||||
}
|
||||
_sniTrayIcon = nullptr;
|
||||
|
||||
if (trayIcon) {
|
||||
trayIcon->setContextMenu(0);
|
||||
trayIcon->deleteLater();
|
||||
|
|
Loading…
Reference in New Issue