From a209ee7865487f9833e43618f3509a081d48e68b Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 23 Sep 2019 22:13:43 +0200 Subject: [PATCH] Don't notify ksplash in our wayland session Summary: KSplash doesn't expect a kwin notification on wayland as kwin is started before ksplash. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: broulik, zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D23770 --- main.cpp | 14 ++------------ main_wayland.cpp | 1 - main_x11.cpp | 12 ++++++++++++ main_x11.h | 1 + 4 files changed, 15 insertions(+), 13 deletions(-) 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);