diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,7 @@ Service Solid WidgetsAddons + WindowSystem XmlGui Declarative Package @@ -126,6 +127,7 @@ KF5::Service KF5::Solid KF5::WidgetsAddons + KF5::WindowSystem KF5::XmlGui ) diff --git a/main.cpp b/main.cpp --- a/main.cpp +++ b/main.cpp @@ -29,6 +29,7 @@ #include #include #include +#include //Qt #include @@ -61,10 +62,14 @@ parser.process(*this); aboutData.processCommandLine(&parser); + auto *service = new KDBusService(KDBusService::Unique, this); + display = new KInfoCenter(); display->show(); - (void)new KDBusService(KDBusService::Unique, this); + connect(service, &KDBusService::activateRequested, this, [this]() { + KWindowSystem::forceActiveWindow(display->winId()); + }); } int main(int argc, char *argv[])