Add kde patches
The nixpkgs patch is to clear out a conflict with a patch that's applied to plasma-workspace by nixpkgs
This commit is contained in:
parent
fd0f27145a
commit
98f9b3a8fc
23 changed files with 7818 additions and 0 deletions
6
roles/kde/patches/plasma-workspace/patches.txt
Normal file
6
roles/kde/patches/plasma-workspace/patches.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Plasma 6.5.0:
|
||||
|
||||
Pr 5589 https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5589
|
||||
Pr 5626 https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5626
|
||||
Pr 5627 https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5627
|
||||
Pr 5628 https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5628
|
||||
37
roles/kde/patches/plasma-workspace/pr5589.patch
Normal file
37
roles/kde/patches/plasma-workspace/pr5589.patch
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
From 2278398309c68ce401a8e35b193fca3782391a4a Mon Sep 17 00:00:00 2001
|
||||
From: Nate Graham <nate@kde.org>
|
||||
Date: Thu, 12 Jun 2025 09:15:15 -0600
|
||||
Subject: [PATCH] applets/devicenotifier: use standard section header
|
||||
|
||||
No need for a custom header here when we have a standard one.
|
||||
|
||||
CCBUG: 442724
|
||||
---
|
||||
.../package/contents/ui/FullRepresentation.qml | 10 ++--------
|
||||
1 file changed, 2 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml
|
||||
index 967223e0a1a..a0c28df45fe 100644
|
||||
--- a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml
|
||||
+++ b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml
|
||||
@@ -132,15 +132,9 @@ PlasmaExtras.Representation {
|
||||
|
||||
section {
|
||||
property: "deviceType"
|
||||
- delegate: Item {
|
||||
- height: Math.floor(childrenRect.height)
|
||||
+ delegate: PlasmaExtras.ListSectionHeader {
|
||||
width: notifierDialog.width - (scrollView.PlasmaComponents3.ScrollBar.vertical.visible ? Kirigami.Units.largeSpacing * 2 : 0)
|
||||
- Kirigami.Heading {
|
||||
- level: 3
|
||||
- opacity: 0.6
|
||||
- text: section
|
||||
- textFormat: Text.PlainText
|
||||
- }
|
||||
+ text: section
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
102
roles/kde/patches/plasma-workspace/pr5626.patch
Normal file
102
roles/kde/patches/plasma-workspace/pr5626.patch
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
From 9fabf42c39a25308739dd3483881cc889243bf58 Mon Sep 17 00:00:00 2001
|
||||
From: Kristen McWilliam <kristen@kde.org>
|
||||
Date: Tue, 24 Jun 2025 17:44:33 -0400
|
||||
Subject: [PATCH] applets/notifications: Add actions to missed notifications
|
||||
notification
|
||||
|
||||
When a notification is displayed informing the user that notifications were missed while in Do Not
|
||||
Disturb, now clicking the button or the notification itself will open the notifications applet to
|
||||
show the missed notifications.
|
||||
|
||||
BUG: 502423
|
||||
---
|
||||
.../package/contents/ui/main.qml | 10 ++++++
|
||||
libnotificationmanager/notifications.cpp | 34 ++++++++++++++-----
|
||||
libnotificationmanager/notifications.h | 7 ++++
|
||||
3 files changed, 42 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/applets/notifications/package/contents/ui/main.qml b/applets/notifications/package/contents/ui/main.qml
|
||||
index c96afa0558d..ab66a52f45e 100644
|
||||
--- a/applets/notifications/package/contents/ui/main.qml
|
||||
+++ b/applets/notifications/package/contents/ui/main.qml
|
||||
@@ -268,4 +268,14 @@ PlasmoidItem {
|
||||
Component.onDestruction: {
|
||||
Globals.forget(root);
|
||||
}
|
||||
+
|
||||
+ Connections {
|
||||
+ target: Globals.popupNotificationsModel
|
||||
+
|
||||
+ // The user requested to show the notifications popup, probably by
|
||||
+ // clicking the "Missed Notifications in Do Not Disturb" notification.
|
||||
+ function onShowNotificationsRequested(): void {
|
||||
+ root.expanded = true;
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
diff --git a/libnotificationmanager/notifications.cpp b/libnotificationmanager/notifications.cpp
|
||||
index 2cba1360b10..7b5cd9d68c4 100644
|
||||
--- a/libnotificationmanager/notifications.cpp
|
||||
+++ b/libnotificationmanager/notifications.cpp
|
||||
@@ -903,15 +903,31 @@ void Notifications::showInhibitionSummary(Urgency urgency, const QStringList &bl
|
||||
return;
|
||||
}
|
||||
|
||||
- KNotification::event(u"inhibitionSummary"_s,
|
||||
- i18ncp("@title", "Unread Notification", "Unread Notifications", inhibited),
|
||||
- i18ncp("@info",
|
||||
- "%1 notification was received while Do Not Disturb was active.",
|
||||
- "%1 notifications were received while Do Not Disturb was active.",
|
||||
- inhibited),
|
||||
- u"preferences-desktop-notification-bell"_s,
|
||||
- KNotification::CloseOnTimeout,
|
||||
- u"libnotificationmanager"_s);
|
||||
+ KNotification *notification = new KNotification(u"inhibitionSummary"_s);
|
||||
+ notification->setTitle(i18ncp("@title", "Unread Notification", "Unread Notifications", inhibited));
|
||||
+ notification->setText(i18ncp("@info",
|
||||
+ "%1 notification was received while Do Not Disturb was active.",
|
||||
+ "%1 notifications were received while Do Not Disturb was active.",
|
||||
+ inhibited));
|
||||
+ notification->setIconName(u"preferences-desktop-notification-bell"_s);
|
||||
+ notification->setFlags(KNotification::CloseOnTimeout);
|
||||
+ notification->setComponentName(u"libnotificationmanager"_s);
|
||||
+
|
||||
+ const QString showNotificationsText = i18nc( //
|
||||
+ "@action:button Show the notifications popup; translate this in as short a form as possible",
|
||||
+ "Show Notifications");
|
||||
+
|
||||
+ const KNotificationAction *defaultShowNotificationsAction = notification->addDefaultAction(showNotificationsText);
|
||||
+ connect(defaultShowNotificationsAction, &KNotificationAction::activated, this, [this]() {
|
||||
+ Q_EMIT showNotificationsRequested();
|
||||
+ });
|
||||
+
|
||||
+ const KNotificationAction *showNotificationsAction = notification->addAction(showNotificationsText);
|
||||
+ connect(showNotificationsAction, &KNotificationAction::activated, this, [this]() {
|
||||
+ Q_EMIT showNotificationsRequested();
|
||||
+ });
|
||||
+
|
||||
+ notification->sendEvent();
|
||||
}
|
||||
|
||||
QVariant Notifications::data(const QModelIndex &index, int role) const
|
||||
diff --git a/libnotificationmanager/notifications.h b/libnotificationmanager/notifications.h
|
||||
index e927c472c8f..8544b6271ae 100644
|
||||
--- a/libnotificationmanager/notifications.h
|
||||
+++ b/libnotificationmanager/notifications.h
|
||||
@@ -597,6 +597,13 @@ Q_SIGNALS:
|
||||
void jobsPercentageChanged();
|
||||
void windowChanged(QWindow *window);
|
||||
|
||||
+ /**
|
||||
+ * Emitted when the user has requested to show the notifications popup.
|
||||
+ *
|
||||
+ * This is typically connected to a button in the "Missed Notifications in Do Not Disturb" notification.
|
||||
+ */
|
||||
+ void showNotificationsRequested();
|
||||
+
|
||||
protected:
|
||||
void classBegin() override;
|
||||
void componentComplete() override;
|
||||
--
|
||||
GitLab
|
||||
|
||||
157
roles/kde/patches/plasma-workspace/pr5627.patch
Normal file
157
roles/kde/patches/plasma-workspace/pr5627.patch
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
From 1641ea3897d565d672e29a7524ce4171ddbcfd32 Mon Sep 17 00:00:00 2001
|
||||
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
Date: Wed, 25 Jun 2025 14:00:05 +0300
|
||||
Subject: [PATCH 1/2] shell: Set desktop ksplash stage when all desktop views
|
||||
are ready
|
||||
|
||||
If there are two outputs and the wallpaper for the first one is ready
|
||||
but for the second one is not, the ksplash will be notified about the
|
||||
desktop stage.
|
||||
|
||||
This changes fixes checkAllDesktopsUiReady() so it sets the desktop
|
||||
stage only if all desktop views are ready.
|
||||
---
|
||||
shell/shellcorona.cpp | 28 +++++++++++++++-------------
|
||||
shell/shellcorona.h | 2 +-
|
||||
2 files changed, 16 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
|
||||
index 37d93d05353..65c8ccc272e 100644
|
||||
--- a/shell/shellcorona.cpp
|
||||
+++ b/shell/shellcorona.cpp
|
||||
@@ -1338,6 +1338,8 @@ void ShellCorona::removeDesktop(DesktopView *desktopView)
|
||||
|
||||
desktopView->destroy();
|
||||
desktopView->containment()->reactToScreenChange();
|
||||
+
|
||||
+ checkAllDesktopsUiReady();
|
||||
}
|
||||
|
||||
PanelView *ShellCorona::panelView(Plasma::Containment *containment) const
|
||||
@@ -1529,22 +1531,22 @@ void ShellCorona::addOutput(QScreen *screen)
|
||||
#endif
|
||||
}
|
||||
|
||||
-void ShellCorona::checkAllDesktopsUiReady(bool ready)
|
||||
+void ShellCorona::checkAllDesktopsUiReady()
|
||||
{
|
||||
- if (!ready)
|
||||
+ const bool ready = std::ranges::all_of(std::as_const(m_desktopViewForScreen), [](const DesktopView *view) {
|
||||
+ return view->containment()->isUiReady();
|
||||
+ });
|
||||
+ if (!ready) {
|
||||
return;
|
||||
- for (auto v : std::as_const(m_desktopViewForScreen)) {
|
||||
- if (!v->containment()->isUiReady())
|
||||
- return;
|
||||
-
|
||||
- qCDebug(PLASMASHELL) << "Plasma Shell startup completed";
|
||||
- QDBusMessage ksplashProgressMessage = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"),
|
||||
- QStringLiteral("/KSplash"),
|
||||
- QStringLiteral("org.kde.KSplash"),
|
||||
- QStringLiteral("setStage"));
|
||||
- ksplashProgressMessage.setArguments(QList<QVariant>() << QStringLiteral("desktop"));
|
||||
- QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage);
|
||||
}
|
||||
+
|
||||
+ qCDebug(PLASMASHELL) << "Plasma Shell startup completed";
|
||||
+ QDBusMessage ksplashProgressMessage = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"),
|
||||
+ QStringLiteral("/KSplash"),
|
||||
+ QStringLiteral("org.kde.KSplash"),
|
||||
+ QStringLiteral("setStage"));
|
||||
+ ksplashProgressMessage.setArguments(QList<QVariant>() << QStringLiteral("desktop"));
|
||||
+ QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage);
|
||||
}
|
||||
|
||||
Plasma::Containment *ShellCorona::createContainmentForActivity(const QString &activity, int screenNum)
|
||||
diff --git a/shell/shellcorona.h b/shell/shellcorona.h
|
||||
index 0f544ca266f..7b6c6a559a1 100644
|
||||
--- a/shell/shellcorona.h
|
||||
+++ b/shell/shellcorona.h
|
||||
@@ -275,7 +275,7 @@ private:
|
||||
DesktopView *desktopForScreen(QScreen *screen) const;
|
||||
void setupWaylandIntegration();
|
||||
void executeSetupPlasmoidScript(Plasma::Containment *containment, Plasma::Applet *applet);
|
||||
- void checkAllDesktopsUiReady(bool ready);
|
||||
+ void checkAllDesktopsUiReady();
|
||||
void activateLauncherMenu(const QString &screenName);
|
||||
void handleColorRequestedFromDBus(const QDBusMessage &msg);
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 00bd19ecaccbb10d5cfcc6006b06a9714c615741 Mon Sep 17 00:00:00 2001
|
||||
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
Date: Wed, 25 Jun 2025 14:03:28 +0300
|
||||
Subject: [PATCH 2/2] shell: Create panel views after desktop views are ready
|
||||
|
||||
With the current code, the splash screen will be hidden as soon as the
|
||||
wallpapers are loaded.
|
||||
|
||||
However, the splash screnn is actually notified about the desktop stage
|
||||
about 1-1.5 second later after the wallpaper plugin resets the loading
|
||||
property.
|
||||
|
||||
The reason for that is that the panel is loaded between
|
||||
`wallpaper.loading = false` in the wallpaper and ShellCorona::checkAllDesktopsUiReady().
|
||||
|
||||
This change re-arranges the startup sequence so the panels are loaded
|
||||
after the desktop views become ready. It reduces plasma startup time a bit.
|
||||
|
||||
In long term, we should look for making panel loading as async as
|
||||
possible so the main thread doesn't get blocked for too long.
|
||||
---
|
||||
shell/shellcorona.cpp | 15 +++++----------
|
||||
1 file changed, 5 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
|
||||
index 65c8ccc272e..6a59683dba7 100644
|
||||
--- a/shell/shellcorona.cpp
|
||||
+++ b/shell/shellcorona.cpp
|
||||
@@ -868,10 +868,6 @@ void ShellCorona::load()
|
||||
connect(m_screenPool, &ScreenPool::screenOrderChanged, this, &ShellCorona::handleScreenOrderChanged, Qt::UniqueConnection);
|
||||
connect(m_screenPool, &ScreenPool::screenRemoved, this, &ShellCorona::handleScreenRemoved, Qt::UniqueConnection);
|
||||
|
||||
- if (!m_waitingPanels.isEmpty()) {
|
||||
- m_waitingPanelsTimer.start();
|
||||
- }
|
||||
-
|
||||
if (config()->isImmutable() || !KAuthorized::authorize(QStringLiteral("plasma/plasmashell/unlockedDesktop"))) {
|
||||
setImmutability(Plasma::Types::SystemImmutable);
|
||||
} else {
|
||||
@@ -1517,11 +1513,6 @@ void ShellCorona::addOutput(QScreen *screen)
|
||||
// in the list. We still don't want to have an invisible view added.
|
||||
containment->reactToScreenChange();
|
||||
|
||||
- // were there any panels for this screen before it popped up?
|
||||
- if (!m_waitingPanels.isEmpty()) {
|
||||
- m_waitingPanelsTimer.start();
|
||||
- }
|
||||
-
|
||||
if (!m_screenReorderInProgress) {
|
||||
Q_EMIT availableScreenRectChanged(m_screenPool->idForScreen(screen));
|
||||
}
|
||||
@@ -1547,6 +1538,10 @@ void ShellCorona::checkAllDesktopsUiReady()
|
||||
QStringLiteral("setStage"));
|
||||
ksplashProgressMessage.setArguments(QList<QVariant>() << QStringLiteral("desktop"));
|
||||
QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage);
|
||||
+
|
||||
+ if (!m_waitingPanels.isEmpty()) {
|
||||
+ m_waitingPanelsTimer.start();
|
||||
+ }
|
||||
}
|
||||
|
||||
Plasma::Containment *ShellCorona::createContainmentForActivity(const QString &activity, int screenNum)
|
||||
@@ -1604,7 +1599,7 @@ void ShellCorona::createWaitingPanels()
|
||||
|
||||
QScreen *screen = m_screenPool->screenForId(requestedScreen);
|
||||
DesktopView *desktopView = desktopForScreen(screen);
|
||||
- if (!screen || !desktopView) {
|
||||
+ if (!screen || !desktopView || !desktopView->containment()->isUiReady()) {
|
||||
stillWaitingPanels << cont;
|
||||
continue;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
||||
277
roles/kde/patches/plasma-workspace/pr5628.patch
Normal file
277
roles/kde/patches/plasma-workspace/pr5628.patch
Normal file
|
|
@ -0,0 +1,277 @@
|
|||
From 9171f24afe6be37e1ac384b8ef03ff89b552be7a Mon Sep 17 00:00:00 2001
|
||||
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
Date: Wed, 25 Jun 2025 17:25:37 +0300
|
||||
Subject: [PATCH 1/2] startkde: Remove Before=plasma-ksplash-ready.service
|
||||
|
||||
This line makes ksplash wait for unrelated services such as powerdevil
|
||||
and baloo.
|
||||
|
||||
This change reduces plasma startup time on my machine to 2-3 seconds.
|
||||
---
|
||||
startkde/systemd/plasma-workspace.target | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/startkde/systemd/plasma-workspace.target b/startkde/systemd/plasma-workspace.target
|
||||
index a62db5e252a..a9113f49112 100644
|
||||
--- a/startkde/systemd/plasma-workspace.target
|
||||
+++ b/startkde/systemd/plasma-workspace.target
|
||||
@@ -17,7 +17,6 @@ Wants=xdg-desktop-autostart.target
|
||||
BindsTo=graphical-session.target
|
||||
Before=graphical-session.target
|
||||
Before=xdg-desktop-autostart.target
|
||||
-Before=plasma-ksplash-ready.service
|
||||
Before=plasma-restoresession.service
|
||||
RefuseManualStart=yes
|
||||
StopWhenUnneeded=true
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 8202ba92b610c691b8bc6bab8ad5a1c3b9ac73da Mon Sep 17 00:00:00 2001
|
||||
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||
Date: Wed, 25 Jun 2025 17:29:19 +0300
|
||||
Subject: [PATCH 2/2] startkde: Drop ready stage
|
||||
|
||||
In order to hide the splash screen, it is sufficient just to see the
|
||||
wallpaper. If more desktop environment components are loaded soon
|
||||
afterwards, it is okay.
|
||||
|
||||
With systemd boot, the way the ready stage is integrated is also kind
|
||||
of a hack.
|
||||
---
|
||||
appiumtests/CMakeLists.txt | 1 -
|
||||
appiumtests/ksplash/CMakeLists.txt | 14 ----
|
||||
appiumtests/ksplash/ksplashtest.py | 79 -------------------
|
||||
ksplash/ksplashqml/splashapp.cpp | 5 +-
|
||||
startkde/plasma-session/startup.cpp | 11 ---
|
||||
startkde/plasma-session/startup.h | 1 -
|
||||
startkde/systemd/CMakeLists.txt | 3 -
|
||||
.../systemd/plasma-ksplash-ready.service.in | 10 ---
|
||||
startkde/systemd/plasma-workspace.target | 1 -
|
||||
9 files changed, 2 insertions(+), 123 deletions(-)
|
||||
delete mode 100644 appiumtests/ksplash/CMakeLists.txt
|
||||
delete mode 100755 appiumtests/ksplash/ksplashtest.py
|
||||
delete mode 100644 startkde/systemd/plasma-ksplash-ready.service.in
|
||||
|
||||
diff --git a/appiumtests/CMakeLists.txt b/appiumtests/CMakeLists.txt
|
||||
index 68d0b6895ba..22234aeb031 100644
|
||||
--- a/appiumtests/CMakeLists.txt
|
||||
+++ b/appiumtests/CMakeLists.txt
|
||||
@@ -20,5 +20,4 @@ add_subdirectory(applets)
|
||||
add_subdirectory(components_tests)
|
||||
add_subdirectory(kcms)
|
||||
add_subdirectory(krunner)
|
||||
-add_subdirectory(ksplash)
|
||||
add_subdirectory(wallpapers)
|
||||
diff --git a/appiumtests/ksplash/CMakeLists.txt b/appiumtests/ksplash/CMakeLists.txt
|
||||
deleted file mode 100644
|
||||
index 3bea5174f5a..00000000000
|
||||
--- a/appiumtests/ksplash/CMakeLists.txt
|
||||
+++ /dev/null
|
||||
@@ -1,14 +0,0 @@
|
||||
-# SPDX-FileCopyrightText: 2024 Fushan Wen <qydwhotmail@gmail.com>
|
||||
-# SPDX-License-Identifier: BSD-3-Clause
|
||||
-
|
||||
-add_test(
|
||||
- NAME ksplashtest_wayland
|
||||
- COMMAND sh -c "mkdir -p /tmp/appium/ksplashtest_wayland;dbus-launch selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/ksplashtest.py --failfast"
|
||||
-)
|
||||
-set_tests_properties(ksplashtest_wayland PROPERTIES TIMEOUT 60 ENVIRONMENT "XDG_RUNTIME_DIR=/tmp/appium/ksplashtest_wayland;FLASK_PORT=5701")
|
||||
-
|
||||
-add_test(
|
||||
- NAME ksplashtest_x11
|
||||
- COMMAND sh -c "mkdir -p /tmp/appium/ksplashtest_x11;dbus-launch selenium-webdriver-at-spi-run ${CMAKE_CURRENT_SOURCE_DIR}/ksplashtest.py --failfast"
|
||||
-)
|
||||
-set_tests_properties(ksplashtest_x11 PROPERTIES TIMEOUT 60 ENVIRONMENT "XDG_RUNTIME_DIR=/tmp/appium/ksplashtest_x11;FLASK_PORT=5702;TEST_WITH_KWIN_WAYLAND=0")
|
||||
diff --git a/appiumtests/ksplash/ksplashtest.py b/appiumtests/ksplash/ksplashtest.py
|
||||
deleted file mode 100755
|
||||
index b7ca43c0519..00000000000
|
||||
--- a/appiumtests/ksplash/ksplashtest.py
|
||||
+++ /dev/null
|
||||
@@ -1,79 +0,0 @@
|
||||
-#!/usr/bin/env python3
|
||||
-
|
||||
-# SPDX-FileCopyrightText: 2024 Fushan Wen <qydwhotmail@gmail.com>
|
||||
-# SPDX-License-Identifier: MIT
|
||||
-
|
||||
-# pylint: disable=too-many-arguments
|
||||
-
|
||||
-import os
|
||||
-import subprocess
|
||||
-import sys
|
||||
-import time
|
||||
-import unittest
|
||||
-
|
||||
-from appium import webdriver
|
||||
-from appium.options.common.base import AppiumOptions
|
||||
-from appium.webdriver.common.appiumby import AppiumBy
|
||||
-from gi.repository import Gio, GLib
|
||||
-
|
||||
-
|
||||
-class KSplashTest(unittest.TestCase):
|
||||
-
|
||||
- driver: webdriver.Remote
|
||||
-
|
||||
- @classmethod
|
||||
- def setUpClass(cls) -> None:
|
||||
- options = AppiumOptions()
|
||||
- options.set_capability("app", "ksplashqml --window")
|
||||
- options.set_capability("environ", {
|
||||
- "LC_ALL": "en_US.UTF-8",
|
||||
- "QT_FATAL_WARNINGS": "1",
|
||||
- "QT_LOGGING_RULES": "qt.accessibility.atspi.warning=false;kf.plasma.core.warning=false;kf.windowsystem.warning=false;kf.kirigami.platform.warning=false;org.kde.plasma.ksplashqml.debug=true",
|
||||
- })
|
||||
- options.set_capability("timeouts", {'implicit': 10000})
|
||||
- cls.driver = webdriver.Remote(command_executor=f'http://127.0.0.1:{os.getenv("FLASK_PORT", "4723")}', options=options)
|
||||
-
|
||||
- def tearDown(self) -> None:
|
||||
- """
|
||||
- Take screenshot when the current test fails
|
||||
- """
|
||||
- if not self._outcome.result.wasSuccessful():
|
||||
- self.driver.get_screenshot_as_file(f"failed_test_shot_ksplash_#{self.id()}.png")
|
||||
-
|
||||
- def test_1_bug494840_setStage(self) -> None:
|
||||
- """
|
||||
- Checks if the setStage method is ever called after starting plasma-ksplash-ready.service.
|
||||
- """
|
||||
- if os.getenv("TEST_WITH_KWIN_WAYLAND", "1") == "0":
|
||||
- stages = ("wm", "kcminit", "ksmserver", "startPlasma", "desktop")
|
||||
- else:
|
||||
- stages = ("kcminit", "ksmserver", "startPlasma", "desktop")
|
||||
-
|
||||
- session_bus = Gio.bus_get_sync(Gio.BusType.SESSION)
|
||||
- for stage in stages:
|
||||
- message: Gio.DBusMessage = Gio.DBusMessage.new_method_call("org.kde.KSplash", "/KSplash", "org.kde.KSplash", "setStage")
|
||||
- message.set_body(GLib.Variant("(s)", [stage]))
|
||||
- session_bus.send_message_with_reply_sync(message, Gio.DBusSendMessageFlags.NONE, 3000)
|
||||
-
|
||||
- self.driver.find_element(AppiumBy.NAME, "Plasma made by KDE")
|
||||
-
|
||||
- with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir, "startkde", "systemd", "plasma-ksplash-ready.service.in"), encoding="utf-8") as handler:
|
||||
- for line in handler:
|
||||
- if line.startswith("ExecStart="):
|
||||
- command = line.removeprefix("ExecStart=").strip().split(" ")
|
||||
- subprocess.check_call(command, stdout=sys.stderr, stderr=sys.stderr)
|
||||
- break
|
||||
-
|
||||
- success = False
|
||||
- for _ in range(10):
|
||||
- try:
|
||||
- subprocess.check_call(["pidof", "ksplashqml"])
|
||||
- except subprocess.CalledProcessError:
|
||||
- success = True
|
||||
- break
|
||||
- time.sleep(1)
|
||||
- self.assertTrue(success)
|
||||
-
|
||||
-
|
||||
-if __name__ == '__main__':
|
||||
- unittest.main()
|
||||
diff --git a/ksplash/ksplashqml/splashapp.cpp b/ksplash/ksplashqml/splashapp.cpp
|
||||
index b60a58724be..2262503b1c3 100644
|
||||
--- a/ksplash/ksplashqml/splashapp.cpp
|
||||
+++ b/ksplash/ksplashqml/splashapp.cpp
|
||||
@@ -26,13 +26,12 @@
|
||||
#define TEST_STEP_INTERVAL 2000
|
||||
|
||||
/**
|
||||
- * There are 7 stages in ksplash
|
||||
+ * There are 6 stages in ksplash
|
||||
* - initial (from this class)
|
||||
* - startPlasma (from startplasma)
|
||||
* - kcminit
|
||||
* - ksmserver
|
||||
* - wm (for X11 from KWin, for Wayland from this class)
|
||||
- * - ready (from plasma-session startup)
|
||||
* - desktop (from shellcorona)
|
||||
*/
|
||||
|
||||
@@ -114,7 +113,7 @@ void SplashApp::setStage(const QString &stage)
|
||||
void SplashApp::setStage(int stage)
|
||||
{
|
||||
m_stage = stage;
|
||||
- if (m_stage == 7) {
|
||||
+ if (m_stage == 6) {
|
||||
QGuiApplication::exit(EXIT_SUCCESS);
|
||||
}
|
||||
for (SplashWindow *w : std::as_const(m_windows)) {
|
||||
diff --git a/startkde/plasma-session/startup.cpp b/startkde/plasma-session/startup.cpp
|
||||
index a731c7b2791..0567e00881f 100644
|
||||
--- a/startkde/plasma-session/startup.cpp
|
||||
+++ b/startkde/plasma-session/startup.cpp
|
||||
@@ -206,20 +206,9 @@ Startup::Startup(QObject *parent)
|
||||
// app will be closed when all KJobs finish thanks to the QEventLoopLocker in each KJob
|
||||
}
|
||||
|
||||
-void Startup::upAndRunning(const QString &msg)
|
||||
-{
|
||||
- QDBusMessage ksplashProgressMessage = QDBusMessage::createMethodCall(QStringLiteral("org.kde.KSplash"),
|
||||
- QStringLiteral("/KSplash"),
|
||||
- QStringLiteral("org.kde.KSplash"),
|
||||
- QStringLiteral("setStage"));
|
||||
- ksplashProgressMessage.setArguments(QList<QVariant>() << msg);
|
||||
- QDBusConnection::sessionBus().asyncCall(ksplashProgressMessage);
|
||||
-}
|
||||
-
|
||||
void Startup::finishStartup()
|
||||
{
|
||||
qCDebug(PLASMA_SESSION) << "Finished";
|
||||
- upAndRunning(QStringLiteral("ready"));
|
||||
|
||||
playStartupSound();
|
||||
new SessionTrack(m_processes);
|
||||
diff --git a/startkde/plasma-session/startup.h b/startkde/plasma-session/startup.h
|
||||
index 6ef4fee9bdd..876a1439fce 100644
|
||||
--- a/startkde/plasma-session/startup.h
|
||||
+++ b/startkde/plasma-session/startup.h
|
||||
@@ -20,7 +20,6 @@ class Startup : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
Startup(QObject *parent);
|
||||
- void upAndRunning(const QString &msg);
|
||||
void finishStartup();
|
||||
|
||||
static Startup *self()
|
||||
diff --git a/startkde/systemd/CMakeLists.txt b/startkde/systemd/CMakeLists.txt
|
||||
index 2f5d30e8456..c3455ebae81 100644
|
||||
--- a/startkde/systemd/CMakeLists.txt
|
||||
+++ b/startkde/systemd/CMakeLists.txt
|
||||
@@ -1,6 +1,3 @@
|
||||
-ecm_install_configured_files(INPUT plasma-ksplash-ready.service.in @ONLY
|
||||
- DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
|
||||
-
|
||||
install(FILES plasma-core.target DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
|
||||
install(FILES plasma-workspace.target DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
|
||||
install(FILES plasma-workspace-wayland.target DESTINATION ${KDE_INSTALL_SYSTEMDUSERUNITDIR})
|
||||
diff --git a/startkde/systemd/plasma-ksplash-ready.service.in b/startkde/systemd/plasma-ksplash-ready.service.in
|
||||
deleted file mode 100644
|
||||
index 1e903130a96..00000000000
|
||||
--- a/startkde/systemd/plasma-ksplash-ready.service.in
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-[Unit]
|
||||
-Description=KSplash "ready" Stage
|
||||
-Wants=plasma-core.target
|
||||
-After=plasma-core.target
|
||||
-PartOf=graphical-session.target
|
||||
-
|
||||
-[Service]
|
||||
-Type=oneshot
|
||||
-ExecStart=dbus-send --session --reply-timeout=1 --type=method_call --dest=org.kde.KSplash /KSplash org.kde.KSplash.setStage string:ready
|
||||
-Slice=session.slice
|
||||
diff --git a/startkde/systemd/plasma-workspace.target b/startkde/systemd/plasma-workspace.target
|
||||
index a9113f49112..4cc8d9330c3 100644
|
||||
--- a/startkde/systemd/plasma-workspace.target
|
||||
+++ b/startkde/systemd/plasma-workspace.target
|
||||
@@ -6,7 +6,6 @@ Wants=plasma-restoresession.service
|
||||
Wants=plasma-xembedsniproxy.service
|
||||
Wants=plasma-gmenudbusmenuproxy.service
|
||||
Wants=plasma-powerdevil.service
|
||||
-Wants=plasma-ksplash-ready.service
|
||||
Wants=plasma-polkit-agent.service
|
||||
Wants=kde-baloo.service
|
||||
Wants=plasma-foreground-booster.service
|
||||
--
|
||||
GitLab
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue