diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-01-05 14:04:26 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-01-05 14:04:26 +0000 |
commit | 8fd9d385e5bc3c01115ec2ddcb2227607eb90861 (patch) | |
tree | aba1e6ef6b95e94172c009394cd1fcbc383e7d6e /kde-plasma/plasma-desktop/files | |
parent | 1ddcee0bd115d2f843f82061cb0d1741bf90151d (diff) |
gentoo auto-resync : 05:01:2024 - 14:04:25
Diffstat (limited to 'kde-plasma/plasma-desktop/files')
-rw-r--r-- | kde-plasma/plasma-desktop/files/plasma-desktop-5.27.9-foldermodel-screen-add-remove-handling.patch | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/kde-plasma/plasma-desktop/files/plasma-desktop-5.27.9-foldermodel-screen-add-remove-handling.patch b/kde-plasma/plasma-desktop/files/plasma-desktop-5.27.9-foldermodel-screen-add-remove-handling.patch deleted file mode 100644 index 8d5ad98b40b7..000000000000 --- a/kde-plasma/plasma-desktop/files/plasma-desktop-5.27.9-foldermodel-screen-add-remove-handling.patch +++ /dev/null @@ -1,95 +0,0 @@ -From a6bc63103ed128ffe0fd843eb3c4416ede835fde Mon Sep 17 00:00:00 2001 -From: Harald Sitter <sitter@kde.org> -Date: Mon, 6 Nov 2023 23:24:57 +0100 -Subject: [PATCH] foldermodel: lift screen add/remove handling out of - screenmapper - -screenmapper is the wrong place for it because we don't know the url -inside the mapper. Instead handle events in the foldermodel and -correctly delegate the add/remove actions to the mapper with both our -screenId AND the activityId - -notably the previous code would incorrectly invoke addScreen with empty -activityIds triggering fallback handling that resulted in incorrect -m_screensPerPath management (there would be no screen associated with -our url anymore after a screenAdded signal because our screen got -associated with no url) and consequently firstAvailableScreen would -return no screen for our url (remember: we are associated with no url) -making FolderModel::filterAcceptsRow return false and filtering -completely valid entries - -BUG: 467951 - -possibly also is the root cause behind -CCBUG: 467092 ---- - containments/desktop/plugins/folder/foldermodel.cpp | 12 +++++++++++- - containments/desktop/plugins/folder/screenmapper.cpp | 9 +-------- - containments/desktop/plugins/folder/screenmapper.h | 2 +- - 3 files changed, 13 insertions(+), 10 deletions(-) - -diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp -index 6a9f8da607..bcab0275e3 100644 ---- a/containments/desktop/plugins/folder/foldermodel.cpp -+++ b/containments/desktop/plugins/folder/foldermodel.cpp -@@ -2024,7 +2024,17 @@ void FolderModel::setAppletInterface(QObject *appletInterface) - Plasma::Corona *corona = containment->corona(); - - if (corona) { -- m_screenMapper->setCorona(corona, m_currentActivity); -+ connect(corona, &Plasma::Corona::screenRemoved, this, [this](int screenId) { -+ if (m_screen == screenId) { -+ m_screenMapper->removeScreen(screenId, m_currentActivity, resolvedUrl()); -+ } -+ }); -+ connect(corona, &Plasma::Corona::screenAdded, this, [this](int screenId) { -+ if (m_screen == screenId) { -+ m_screenMapper->addScreen(screenId, m_currentActivity, resolvedUrl()); -+ } -+ }); -+ m_screenMapper->setCorona(corona); - } - setScreen(containment->screen()); - connect(containment, &Plasma::Containment::screenChanged, this, &FolderModel::setScreen); -diff --git a/containments/desktop/plugins/folder/screenmapper.cpp b/containments/desktop/plugins/folder/screenmapper.cpp -index 83e8a75276..fccea0e3fe 100644 ---- a/containments/desktop/plugins/folder/screenmapper.cpp -+++ b/containments/desktop/plugins/folder/screenmapper.cpp -@@ -243,20 +243,13 @@ void ScreenMapper::cleanup() - } - #endif - --void ScreenMapper::setCorona(Plasma::Corona *corona, const QString &activity) -+void ScreenMapper::setCorona(Plasma::Corona *corona) - { - if (m_corona != corona) { - Q_ASSERT(!m_corona); - - m_corona = corona; - if (m_corona) { -- connect(m_corona, &Plasma::Corona::screenRemoved, this, [this, activity](int screenId) { -- removeScreen(screenId, activity, {}); -- }); -- connect(m_corona, &Plasma::Corona::screenAdded, this, [this, activity](int screenId) { -- addScreen(screenId, activity, {}); -- }); -- - auto config = m_corona->config(); - KConfigGroup group(config, QStringLiteral("ScreenMapping")); - const QStringList mapping = group.readEntry(QStringLiteral("screenMapping"), QStringList{}); -diff --git a/containments/desktop/plugins/folder/screenmapper.h b/containments/desktop/plugins/folder/screenmapper.h -index 47b01e1c08..c22432b2e8 100644 ---- a/containments/desktop/plugins/folder/screenmapper.h -+++ b/containments/desktop/plugins/folder/screenmapper.h -@@ -50,7 +50,7 @@ public: - int screenForItem(const QUrl &url, const QString &activity) const; - void addMapping(const QUrl &url, int screen, const QString &activity, MappingSignalBehavior behavior = ImmediateSignal); - void removeFromMap(const QUrl &url, const QString &activity); -- void setCorona(Plasma::Corona *corona, const QString &activity); -+ void setCorona(Plasma::Corona *corona); - - void addScreen(int screenId, const QString &activity, const QUrl &screenUrl); - void removeScreen(int screenId, const QString &activity, const QUrl &screenUrl); --- -GitLab - |