Fix rasing window when activating notifications

This was done for invite notifications but not regular notifications
This commit is contained in:
Nicolas Fella
2022-05-15 23:28:13 +02:00
parent 6871ed051c
commit 4e61c5e53c

View File

@@ -57,6 +57,9 @@ void NotificationsManager::postNotification(NeoChatRoom *room,
notification->setDefaultAction(i18n("Open NeoChat in this room"));
connect(notification, &KNotification::defaultActivated, this, [=]() {
#if defined(HAVE_WINDOWSYSTEM) && KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5, 90, 0)
KWindowSystem::setCurrentXdgActivationToken(notification->xdgActivationToken());
#endif
RoomManager::instance().enterRoom(room);
Q_EMIT Controller::instance().showWindow();
});