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
master
David Edmundson 2019-09-23 22:13:43 +02:00
parent a4ec797883
commit a209ee7865
4 changed files with 15 additions and 13 deletions

View File

@ -48,7 +48,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QCommandLineParser>
#include <QQuickWindow>
#include <QStandardPaths>
#include <QtDBus>
#include <QTranslator>
#include <QLibraryInfo>
// 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<QVariant>() << QStringLiteral("wm"));
QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage);
}
void Application::createWorkspace()
{
// we want all QQuickWindows with an alpha buffer, do here as Workspace might create QQuickWindows

View File

@ -191,7 +191,6 @@ void ApplicationWayland::finalizeStartup()
}
startSession();
createWorkspace();
notifyKSplash();
}
void ApplicationWayland::continueStartupWithScene()

View File

@ -47,6 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QSurfaceFormat>
#include <QVBoxLayout>
#include <QX11Info>
#include <QtDBus>
// 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<QVariant>() << QStringLiteral("wm"));
QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage);
}
void ApplicationX11::crashHandler(int signal)
{
crashes++;

View File

@ -45,6 +45,7 @@ private Q_SLOTS:
private:
void crashChecking();
void setupCrashHandler();
void notifyKSplash();
static void crashHandler(int signal);