diff --git a/ksmserver/KSMServerInterface.h b/ksmserver/KSMServerInterface.h deleted file mode 100644 --- a/ksmserver/KSMServerInterface.h +++ /dev/null @@ -1,46 +0,0 @@ -/***************************************************************** -ksmserver - the KDE session management server - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Copyright 2000 Matthias Ettrich -******************************************************************/ - -#ifndef KSMSERVER_INTERFACE_H -#define KSMSERVER_INTERFACE_H - -#include - -class KSMServerInterface : public QObject -{ - Q_OBJECT - Q_CLASSINFO("D-Bus Interface", "org.kde.KSMServerInterface") - -public Q_SLOTS: - Q_SCRIPTABLE void logout(int, int, int ); - Q_SCRIPTABLE QStringList sessionList(); - - Q_SCRIPTABLE QString currentSession(); - Q_SCRIPTABLE void saveCurrentSession(); - Q_SCRIPTABLE void saveCurrentSessionAs( QString ); - - Q_SCRIPTABLE void suspendStartup( QString ); - Q_SCRIPTABLE void resumeStartup( QString ); -}; - -#endif diff --git a/ksplash/ksplashqml/splashapp.cpp b/ksplash/ksplashqml/splashapp.cpp --- a/ksplash/ksplashqml/splashapp.cpp +++ b/ksplash/ksplashqml/splashapp.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -90,7 +90,6 @@ } connect(this, &QGuiApplication::screenAdded, this, &SplashApp::adoptScreen); - } SplashApp::~SplashApp() @@ -137,13 +136,17 @@ void SplashApp::adoptScreen(QScreen* screen) { SplashWindow *w = new SplashWindow(m_testing, m_window, m_theme); + w->setScreen(screen); w->setGeometry(screen->geometry()); w->setStage(m_stage); w->setVisible(true); m_windows << w; connect(screen, &QScreen::geometryChanged, w, &SplashWindow::setGeometry); - connect(screen, &QObject::destroyed, w, [this, w](){ + connect(qGuiApp, &QGuiApplication::screenRemoved, w, [this, w] (QScreen* screen) { + if (w->screen() != screen) + return; + w->hide(); m_windows.removeAll(w); w->deleteLater(); }); diff --git a/ksplash/ksplashqml/splashwindow.cpp b/ksplash/ksplashqml/splashwindow.cpp --- a/ksplash/ksplashqml/splashwindow.cpp +++ b/ksplash/ksplashqml/splashwindow.cpp @@ -70,7 +70,7 @@ //be sure it will be eventually closed //FIXME: should never be stuck - QTimer::singleShot(30000, this, &QWindow::close); +// QTimer::singleShot(30000, this, &QWindow::close); } void SplashWindow::setStage(int stage) @@ -138,6 +138,7 @@ if (m_shellSurface) { m_shellSurface->setPosition(geometry().topLeft()); } + qWarning() << "setGeometry" << geometry() << m_shellSurface; } void SplashWindow::setupWaylandIntegration() @@ -159,7 +160,9 @@ m_shellSurface = interface->createSurface(s, this); // Use OSD to make it go above all other windows // that's the closest we have to the X11 unmanged layer we have on Wayland - m_shellSurface->setRole(PlasmaShellSurface::Role::OnScreenDisplay); + if (!m_window) + m_shellSurface->setRole(PlasmaShellSurface::Role::OnScreenDisplay); m_shellSurface->setPosition(geometry().topLeft()); + qWarning() << "setupWaylandIntegration" << geometry() << m_shellSurface; } } diff --git a/shell/screenpool.cpp b/shell/screenpool.cpp --- a/shell/screenpool.cpp +++ b/shell/screenpool.cpp @@ -152,11 +152,7 @@ int ScreenPool::id(const QString &connector) const { - if (!m_idForConnector.contains(connector)) { - return -1; - } - - return m_idForConnector.value(connector); + return m_idForConnector.value(connector, -1); } QString ScreenPool::connector(int id) const diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp --- a/shell/shellcorona.cpp +++ b/shell/shellcorona.cpp @@ -1295,6 +1295,8 @@ } }); + qDebug() << "xx" << screen->name(); + Plasma::Containment *containment = createContainmentForActivity(m_activityController->currentActivity(), insertPosition); Q_ASSERT(containment); diff --git a/startkde/plasma-shutdown/shutdown.h b/startkde/plasma-shutdown/shutdown.h --- a/startkde/plasma-shutdown/shutdown.h +++ b/startkde/plasma-shutdown/shutdown.h @@ -41,5 +41,5 @@ private: void startLogout(KWorkSpace::ShutdownType shutdownType); void runShutdownScripts(); - KWorkSpace::ShutdownType m_shutdownType; + KWorkSpace::ShutdownType m_shutdownType = KWorkSpace::ShutdownTypeNone; }; diff --git a/startkde/plasma-shutdown/shutdown.cpp b/startkde/plasma-shutdown/shutdown.cpp --- a/startkde/plasma-shutdown/shutdown.cpp +++ b/startkde/plasma-shutdown/shutdown.cpp @@ -47,7 +47,7 @@ connect(watcher, &QDBusPendingCallWatcher::finished, this, [closeSessionReply, watcher, this]() { watcher->deleteLater(); if (closeSessionReply.isError()) { - qCWarning(PLASMA_SESSION) << "ksmserver failed to complete logout"; + qCWarning(PLASMA_SESSION) << "ksmserver failed to complete logout" << closeSessionReply.error(); qApp->quit(); } if (closeSessionReply.value()) { diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp --- a/startkde/startplasma.cpp +++ b/startkde/startplasma.cpp @@ -387,11 +387,14 @@ } }); - QObject::connect(&serviceWatcher, &QDBusServiceWatcher::serviceUnregistered, [&]() { + QObject::connect(&serviceWatcher, &QDBusServiceWatcher::serviceUnregistered, [&](const QString &unreg) { const QStringList watchedServices = serviceWatcher.watchedServices(); bool plasmaSessionRunning = std::any_of(watchedServices.constBegin(), watchedServices.constEnd(), [](const QString &service) { return QDBusConnection::sessionBus().interface()->isServiceRegistered(service); }); + qDebug() << "service unregistered" << unreg << plasmaSessionRunning + << QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.ksmserver")) + << QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.shutdown")); if (!plasmaSessionRunning) { e.quit(); }