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
This commit is contained in:
Nicolas Fella
2024-03-11 10:56:47 +01:00
parent 23c9a4fea7
commit 550dc43dc0

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());