Don't create tray icon if system tray is not supported

This fixes the problem that the tray icon is created in GNOME if it was
enabled in other desktop environment previously.



(cherry picked from commit d103de96aa)

Co-authored-by: Balló György <ballogyor@gmail.com>
This commit is contained in:
Joshua Goins
2025-03-06 16:13:40 +00:00
parent 2f6d7308c5
commit 3215224528

View File

@@ -294,7 +294,7 @@ bool Controller::supportSystemTray() const
void Controller::setQuitOnLastWindowClosed()
{
#ifndef Q_OS_ANDROID
if (NeoChatConfig::self()->systemTray()) {
if (supportSystemTray() && NeoChatConfig::self()->systemTray()) {
m_trayIcon = new TrayIcon(this);
m_trayIcon->show();
} else {