Commit f9d8ae6a authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Fix raising window when clicking notification on Wayland

parent ac6317f9
Pipeline #184514 passed with stage
in 4 minutes and 23 seconds
......@@ -17,6 +17,7 @@
#include <KLocalizedString>
#include <KNotification>
#include <KWindowSystem>
namespace Konversation
......@@ -73,7 +74,10 @@ namespace Konversation
}
msg->setDefaultAction(i18n("Open"));
connect(msg, &KNotification::defaultActivated, chatWin, &ChatWindow::activateView);
connect(msg, &KNotification::defaultActivated, chatWin, [msg, chatWin]{
KWindowSystem::setCurrentXdgActivationToken(msg->xdgActivationToken());
chatWin->activateView();
});
if (!Preferences::self()->trayNotifyOnlyOwnNick())
{
......@@ -123,7 +127,10 @@ namespace Konversation
}
msg->setDefaultAction(i18n("Open"));
connect(msg, &KNotification::defaultActivated, chatWin, &ChatWindow::activateView);
connect(msg, &KNotification::defaultActivated, chatWin, [msg, chatWin]{
KWindowSystem::setCurrentXdgActivationToken(msg->xdgActivationToken());
chatWin->activateView();
});
startTrayNotification(chatWin);
}
......@@ -170,7 +177,10 @@ namespace Konversation
}
msg->setDefaultAction(i18n("Open"));
connect(msg, &KNotification::defaultActivated, chatWin, &ChatWindow::activateView);
connect(msg, &KNotification::defaultActivated, chatWin, [msg, chatWin]{
KWindowSystem::setCurrentXdgActivationToken(msg->xdgActivationToken());
chatWin->activateView();
});
startTrayNotification(chatWin);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment