Remove manual window toggling for system tray icon

KStatusNotifierItem automatically does this for us
since we associate our window with it

Doing it again causes the window to be toggled again, which means
it won't be shown

BUG: 479721

BUG: 482779
(cherry picked from commit 550dc43dc0)
This commit is contained in:
Nicolas Fella
2024-03-11 10:56:47 +01:00
parent a75072d069
commit 35aa08b279

View File

@@ -11,10 +11,6 @@ TrayIcon::TrayIcon(QObject *parent)
{
setCategory(KStatusNotifierItem::ItemCategory::Communications);
setIconByName(QStringLiteral("org.kde.neochat.tray"));
connect(this, &KStatusNotifierItem::activateRequested, this, [this] {
KWindowSystem::setCurrentXdgActivationToken(providedToken());
WindowController::instance().toggleWindow();
});
connect(&WindowController::instance(), &WindowController::windowChanged, this, [this] {
setAssociatedWindow(WindowController::instance().window());