diff --git a/main.cpp b/main.cpp index bd2f372f1f..7a367d64c6 100644 --- a/main.cpp +++ b/main.cpp @@ -48,7 +48,8 @@ along with this program. If not, see . #include #include #include -#include +#include +#include // system #ifdef HAVE_UNISTD_H @@ -257,17 +258,6 @@ void Application::setupLocalizedString() KLocalizedString::setApplicationDomain("kwin"); } -void Application::notifyKSplash() -{ - // Tell KSplash that KWin has started - QDBusMessage ksplashProgressMessage = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"), - QStringLiteral("/KSplash"), - QStringLiteral("org.kde.KSplash"), - QStringLiteral("setStage")); - ksplashProgressMessage.setArguments(QList() << QStringLiteral("wm")); - QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage); -} - void Application::createWorkspace() { // we want all QQuickWindows with an alpha buffer, do here as Workspace might create QQuickWindows diff --git a/main_wayland.cpp b/main_wayland.cpp index e734b838a4..bef6438cc1 100644 --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -191,7 +191,6 @@ void ApplicationWayland::finalizeStartup() } startSession(); createWorkspace(); - notifyKSplash(); } void ApplicationWayland::continueStartupWithScene() diff --git a/main_x11.cpp b/main_x11.cpp index 891b8393a3..a58bd33000 100644 --- a/main_x11.cpp +++ b/main_x11.cpp @@ -47,6 +47,7 @@ along with this program. If not, see . #include #include #include +#include // system #ifdef HAVE_UNISTD_H @@ -313,6 +314,17 @@ void ApplicationX11::crashChecking() QTimer::singleShot(15 * 1000, this, SLOT(resetCrashesCount())); } +void ApplicationX11::notifyKSplash() +{ + // Tell KSplash that KWin has started + QDBusMessage ksplashProgressMessage = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"), + QStringLiteral("/KSplash"), + QStringLiteral("org.kde.KSplash"), + QStringLiteral("setStage")); + ksplashProgressMessage.setArguments(QList() << QStringLiteral("wm")); + QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage); +} + void ApplicationX11::crashHandler(int signal) { crashes++; diff --git a/main_x11.h b/main_x11.h index 09f1708df8..d60188964b 100644 --- a/main_x11.h +++ b/main_x11.h @@ -45,6 +45,7 @@ private Q_SLOTS: private: void crashChecking(); void setupCrashHandler(); + void notifyKSplash(); static void crashHandler(int signal);