diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-05-12 16:42:50 +0300 |
commit | 752d6256e5204b958b0ef7905675a940b5e9172f (patch) | |
tree | 330d16e6362a49cbed8875a777fe641a43376cd3 /kde-plasma/kwin/files | |
parent | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff) |
gentoo resync : 12.05.2022
Diffstat (limited to 'kde-plasma/kwin/files')
10 files changed, 568 insertions, 71 deletions
diff --git a/kde-plasma/kwin/files/kwin-5.23.5-fix-ProvidersUrl.patch b/kde-plasma/kwin/files/kwin-5.23.5-fix-ProvidersUrl.patch deleted file mode 100644 index 8829ec286f70..000000000000 --- a/kde-plasma/kwin/files/kwin-5.23.5-fix-ProvidersUrl.patch +++ /dev/null @@ -1,71 +0,0 @@ -From c5c5f67f5d5ef2b4f7145f6586a8b3d8dba7fab5 Mon Sep 17 00:00:00 2001 -From: Ben Cooksley <bcooksley@kde.org> -Date: Mon, 7 Feb 2022 06:12:40 +1300 -Subject: [PATCH] Purge all references to download.kde.org, replacing them with - the correct endpoint of autoconfig.kde.org. - -CCMAIL: plasma-devel@kde.org -CCMAIL: distributions@kde.org -(cherry picked from commit a428630ea4a46e967de71711c8da5cbaeb9b690b) ---- - src/kcmkwin/kwineffects/kwineffect.knsrc | 2 +- - src/kcmkwin/kwinscripts/kwinscripts.knsrc | 2 +- - src/kcmkwin/kwintabbox/kwinswitcher.knsrc | 2 +- - src/plugins/kdecorations/aurorae/src/aurorae.knsrc.cmake | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/kcmkwin/kwineffects/kwineffect.knsrc b/src/kcmkwin/kwineffects/kwineffect.knsrc -index 6abcfb34f8..22bd1c98ec 100644 ---- a/src/kcmkwin/kwineffects/kwineffect.knsrc -+++ b/src/kcmkwin/kwineffects/kwineffect.knsrc -@@ -45,7 +45,7 @@ Name[x-test]=xxWindow Manager Effectsxx - Name[zh_CN]=窗口管理器特效 - Name[zh_TW]=視窗管理員效果 - --ProvidersUrl=https://download.kde.org/ocs/providers.xml -+ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml - Categories=KWin Effects - StandardResource=tmp - Uncompress=kpackage -diff --git a/src/kcmkwin/kwinscripts/kwinscripts.knsrc b/src/kcmkwin/kwinscripts/kwinscripts.knsrc -index 44faa872ba..c002f0eec5 100644 ---- a/src/kcmkwin/kwinscripts/kwinscripts.knsrc -+++ b/src/kcmkwin/kwinscripts/kwinscripts.knsrc -@@ -44,7 +44,7 @@ Name[x-test]=xxWindow Manager Scriptsxx - Name[zh_CN]=窗口管理器脚本 - Name[zh_TW]=視窗管理員指令稿 - --ProvidersUrl=https://download.kde.org/ocs/providers.xml -+ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml - Categories=KWin Scripts - StandardResource=tmp - Uncompress=kpackage -diff --git a/src/kcmkwin/kwintabbox/kwinswitcher.knsrc b/src/kcmkwin/kwintabbox/kwinswitcher.knsrc -index bef9bc07ea..d0f5c3b520 100644 ---- a/src/kcmkwin/kwintabbox/kwinswitcher.knsrc -+++ b/src/kcmkwin/kwintabbox/kwinswitcher.knsrc -@@ -45,7 +45,7 @@ Name[x-test]=xxWindow Manager Switching Layoutsxx - Name[zh_CN]=窗口管理器切换布局 - Name[zh_TW]=視窗切換器佈局 - --ProvidersUrl=https://download.kde.org/ocs/providers.xml -+ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml - Categories=KWin Switching Layouts - StandardResource=tmp - Uncompress=kpackage -diff --git a/src/plugins/kdecorations/aurorae/src/aurorae.knsrc.cmake b/src/plugins/kdecorations/aurorae/src/aurorae.knsrc.cmake -index a773c28c52..d0c7748852 100644 ---- a/src/plugins/kdecorations/aurorae/src/aurorae.knsrc.cmake -+++ b/src/plugins/kdecorations/aurorae/src/aurorae.knsrc.cmake -@@ -40,7 +40,7 @@ Name[x-test]=xxAurorae Window Decorationsxx - Name[zh_CN]=Aurorae 极光窗口装饰 - Name[zh_TW]=Aurorae 視窗裝飾 - --ProvidersUrl=https://download.kde.org/ocs/providers.xml -+ProvidersUrl=https://autoconfig.kde.org/ocs/providers.xml - Categories=Window Decoration Aurorae - Uncompress=archive - TargetDir=aurorae/themes --- -GitLab - diff --git a/kde-plasma/kwin/files/kwin-5.24.4-backends-drm-dont-perm-disable-vrr.patch b/kde-plasma/kwin/files/kwin-5.24.4-backends-drm-dont-perm-disable-vrr.patch new file mode 100644 index 000000000000..38d4771c2345 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-backends-drm-dont-perm-disable-vrr.patch @@ -0,0 +1,32 @@ +From a5404234dbd26e170acb97789599fbcd705cf6cb Mon Sep 17 00:00:00 2001 +From: Xaver Hugl <xaver.hugl@gmail.com> +Date: Fri, 8 Apr 2022 17:47:09 +0200 +Subject: [PATCH] backends/drm: don't permanently disable VRR when the test + commit fails + +In 5.24, the same code path is used for testing direct scanout, so that +causes false negatives. Generally though, the user setting shouldn't be +touched, it's not really proper feedback for the driver or KWin having +problems. + + +(cherry picked from commit 2ef6215a517e4220f147f5327e7ecdad02762b64) +--- + src/backends/drm/drm_output.cpp | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/backends/drm/drm_output.cpp b/src/backends/drm/drm_output.cpp +index bd08631cf7..048803883b 100644 +--- a/src/backends/drm/drm_output.cpp ++++ b/src/backends/drm/drm_output.cpp +@@ -337,7 +337,6 @@ bool DrmOutput::present(const QSharedPointer<DrmBuffer> &buffer, QRegion damaged + m_pipeline->applyPendingChanges(); + } else { + m_pipeline->revertPendingChanges(); +- setVrrPolicy(RenderLoop::VrrPolicy::Never); + } + } + if (m_pipeline->present(buffer)) { +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-backends-drm-fetch-immutable-blobs.patch b/kde-plasma/kwin/files/kwin-5.24.4-backends-drm-fetch-immutable-blobs.patch new file mode 100644 index 000000000000..16c7756d33e2 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-backends-drm-fetch-immutable-blobs.patch @@ -0,0 +1,214 @@ +From 82c2324b5675ea2d5e3b962f270bda1d186e7326 Mon Sep 17 00:00:00 2001 +From: Xaver Hugl <xaver.hugl@gmail.com> +Date: Mon, 4 Apr 2022 20:19:05 +0200 +Subject: [PATCH] backends/drm: fetch immutable blobs in DrmProperty + +If the blob is fetched while there is no kernel-visible reference to it, +the driver may re-use the blob ID. When DrmProperty is created or updated, +KWin holds a reference on the blob via drmModeObjectProperties, so this +should prevent any possible issues. + +CCBUG: 449285 +--- + src/backends/drm/drm_object_connector.cpp | 13 +++----- + src/backends/drm/drm_object_plane.cpp | 39 +++++++++++------------ + src/backends/drm/drm_property.cpp | 27 +++++++++++++++- + src/backends/drm/drm_property.h | 7 +++- + 4 files changed, 54 insertions(+), 32 deletions(-) + +diff --git a/src/backends/drm/drm_object_connector.cpp b/src/backends/drm/drm_object_connector.cpp +index a0045290df..0cdbd70b4f 100644 +--- a/src/backends/drm/drm_object_connector.cpp ++++ b/src/backends/drm/drm_object_connector.cpp +@@ -337,16 +337,11 @@ bool DrmConnector::updateProperties() + } + + // parse edid +- auto edidProp = getProp(PropertyIndex::Edid); +- if (edidProp) { +- DrmScopedPointer<drmModePropertyBlobRes> blob(drmModeGetPropertyBlob(gpu()->fd(), edidProp->current())); +- if (blob && blob->data) { +- m_edid = Edid(blob->data, blob->length); +- if (!m_edid.isValid()) { +- qCWarning(KWIN_DRM) << "Couldn't parse EDID for connector" << this; +- } ++ if (const auto edidProp = getProp(PropertyIndex::Edid); edidProp && edidProp->immutableBlob()) { ++ m_edid = Edid(edidProp->immutableBlob()->data, edidProp->immutableBlob()->length); ++ if (!m_edid.isValid()) { ++ qCWarning(KWIN_DRM) << "Couldn't parse EDID for connector" << this; + } +- deleteProp(PropertyIndex::Edid); + } else { + qCDebug(KWIN_DRM) << "Could not find edid for connector" << this; + } +diff --git a/src/backends/drm/drm_object_plane.cpp b/src/backends/drm/drm_object_plane.cpp +index 6967fdd50d..c4dcca96d4 100644 +--- a/src/backends/drm/drm_object_plane.cpp ++++ b/src/backends/drm/drm_object_plane.cpp +@@ -73,29 +73,26 @@ bool DrmPlane::init() + checkSupport(5, Transformation::ReflectY); + + // read formats from blob if available and if modifiers are supported, and from the plane object if not +- if (auto formatProp = getProp(PropertyIndex::In_Formats); formatProp && gpu()->addFB2ModifiersSupported()) { +- DrmScopedPointer<drmModePropertyBlobRes> propertyBlob(drmModeGetPropertyBlob(gpu()->fd(), formatProp->current())); +- if (propertyBlob && propertyBlob->data) { +- auto blob = static_cast<drm_format_modifier_blob*>(propertyBlob->data); +- auto modifiers = reinterpret_cast<drm_format_modifier*>(reinterpret_cast<uint8_t*>(blob) + blob->modifiers_offset); +- uint32_t *formatarr = reinterpret_cast<uint32_t*>(reinterpret_cast<uint8_t*>(blob) + blob->formats_offset); +- +- for (uint32_t f = 0; f < blob->count_formats; f++) { +- auto format = formatarr[f]; +- QVector<uint64_t> mods; +- for (uint32_t m = 0; m < blob->count_modifiers; m++) { +- auto modifier = &modifiers[m]; +- // The modifier advertisement blob is partitioned into groups of 64 formats +- if (m < modifier->offset || m > modifier->offset + 63) { +- continue; +- } +- if (!(modifier->formats & (1 << (f - modifier->offset)))) { +- continue; +- } +- mods << modifier->modifier; ++ if (const auto formatProp = getProp(PropertyIndex::In_Formats); formatProp && formatProp->immutableBlob() && gpu()->addFB2ModifiersSupported()) { ++ auto blob = static_cast<drm_format_modifier_blob *>(formatProp->immutableBlob()->data); ++ auto modifiers = reinterpret_cast<drm_format_modifier *>(reinterpret_cast<uint8_t *>(blob) + blob->modifiers_offset); ++ uint32_t *formatarr = reinterpret_cast<uint32_t *>(reinterpret_cast<uint8_t *>(blob) + blob->formats_offset); ++ ++ for (uint32_t f = 0; f < blob->count_formats; f++) { ++ auto format = formatarr[f]; ++ QVector<uint64_t> mods; ++ for (uint32_t m = 0; m < blob->count_modifiers; m++) { ++ auto modifier = &modifiers[m]; ++ // The modifier advertisement blob is partitioned into groups of 64 formats ++ if (m < modifier->offset || m > modifier->offset + 63) { ++ continue; + } +- m_supportedFormats.insert(format, mods); ++ if (!(modifier->formats & (1 << (f - modifier->offset)))) { ++ continue; ++ } ++ mods << modifier->modifier; + } ++ m_supportedFormats.insert(format, mods); + } + } else { + for (uint32_t i = 0; i < p->count_formats; i++) { +diff --git a/src/backends/drm/drm_property.cpp b/src/backends/drm/drm_property.cpp +index 28af8ec07f..8ab0dc0e5a 100644 +--- a/src/backends/drm/drm_property.cpp ++++ b/src/backends/drm/drm_property.cpp +@@ -24,6 +24,7 @@ DrmProperty::DrmProperty(DrmObject *obj, drmModePropertyRes *prop, uint64_t val, + , m_next(val) + , m_current(val) + , m_immutable(prop->flags & DRM_MODE_PROP_IMMUTABLE) ++ , m_isBlob(prop->flags & DRM_MODE_PROP_BLOB) + , m_obj(obj) + { + if (!enumNames.isEmpty()) { +@@ -35,6 +36,7 @@ DrmProperty::DrmProperty(DrmObject *obj, drmModePropertyRes *prop, uint64_t val, + m_minValue = prop->values[0]; + m_maxValue = prop->values[1]; + } ++ updateBlob(); + } + + DrmProperty::~DrmProperty() = default; +@@ -110,7 +112,10 @@ bool DrmProperty::needsCommit() const + + void DrmProperty::setCurrent(uint64_t value) + { +- m_current = value; ++ if (m_current != value) { ++ updateBlob(); ++ m_current = value; ++ } + } + + uint64_t DrmProperty::current() const +@@ -122,10 +127,12 @@ QVector<QByteArray> DrmProperty::enumNames() const + { + return m_enumNames; + } ++ + bool DrmProperty::hasEnum(uint64_t value) const + { + return m_enumMap.contains(value); + } ++ + bool DrmProperty::hasAllEnums() const + { + return m_enumMap.count() == m_enumNames.count(); +@@ -166,4 +173,22 @@ uint64_t DrmProperty::maxValue() const + return m_maxValue; + } + ++void DrmProperty::updateBlob() ++{ ++ if (m_immutable && m_isBlob) { ++ if (m_current != 0) { ++ m_immutableBlob.reset(drmModeGetPropertyBlob(m_obj->gpu()->fd(), m_current)); ++ if (m_immutableBlob && (!m_immutableBlob->data || !m_immutableBlob->length)) { ++ m_immutableBlob.reset(); ++ } ++ } else { ++ m_immutableBlob.reset(); ++ } ++ } ++} ++ ++drmModePropertyBlobRes *DrmProperty::immutableBlob() const ++{ ++ return m_immutableBlob.get(); ++} + } +diff --git a/src/backends/drm/drm_property.h b/src/backends/drm/drm_property.h +index 48bdeafdc2..1ae547f41e 100644 +--- a/src/backends/drm/drm_property.h ++++ b/src/backends/drm/drm_property.h +@@ -9,9 +9,9 @@ + */ + + #pragma once ++#include "drm_pointer.h" + + #include <xf86drmMode.h> +- + #include <QVector> + #include <QMap> + #include <QByteArray> +@@ -59,6 +59,7 @@ public: + + void setCurrent(uint64_t value); + uint64_t current() const; ++ drmModePropertyBlobRes *immutableBlob() const; + + uint64_t minValue() const; + uint64_t maxValue() const; +@@ -78,6 +79,8 @@ public: + } + + private: ++ void updateBlob(); ++ + uint32_t m_propId = 0; + QByteArray m_propName; + +@@ -89,6 +92,7 @@ private: + uint64_t m_next = 0; + // the value currently set for or by the kernel + uint64_t m_current = 0; ++ DrmScopedPointer<drmModePropertyBlobRes> m_immutableBlob; + + uint64_t m_minValue = -1; + uint64_t m_maxValue = -1; +@@ -96,6 +100,7 @@ private: + QMap<uint32_t, uint64_t> m_enumMap; + QVector<QByteArray> m_enumNames; + const bool m_immutable; ++ const bool m_isBlob; + bool m_legacy = false; + const DrmObject *m_obj; + }; +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-dont-send-geom-to-text-input.patch b/kde-plasma/kwin/files/kwin-5.24.4-dont-send-geom-to-text-input.patch new file mode 100644 index 000000000000..acd7bf4149ab --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-dont-send-geom-to-text-input.patch @@ -0,0 +1,26 @@ +From a35e3075a7aa4616c8930ccd3869dc4cca5d287e Mon Sep 17 00:00:00 2001 +From: Weng Xuetian <wengxt@gmail.com> +Date: Sat, 9 Apr 2022 07:25:44 -0700 +Subject: [PATCH] Do not send overlay geometry to text input. + +(cherry picked from commit 374e94918238f3ddb9d00c542f281d3d8a309efb) +--- + src/inputmethod.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp +index e7951d9580..5b8e54efbc 100644 +--- a/src/inputmethod.cpp ++++ b/src/inputmethod.cpp +@@ -615,7 +615,7 @@ void InputMethod::updateInputPanelState() + const bool bottomKeyboard = m_inputClient && m_inputClient->mode() != InputPanelV1Client::Overlay && m_inputClient->isShown(); + m_trackedClient->setVirtualKeyboardGeometry(bottomKeyboard ? m_inputClient->inputGeometry() : QRect()); + +- if (m_inputClient) { ++ if (m_inputClient && m_inputClient->mode() != InputPanelV1Client::Overlay) { + overlap = m_trackedClient->frameGeometry() & m_inputClient->inputGeometry(); + overlap.moveTo(m_trackedClient->mapToLocal(overlap.topLeft())); + } +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-dont-use-xcb-in-wayland.patch b/kde-plasma/kwin/files/kwin-5.24.4-dont-use-xcb-in-wayland.patch new file mode 100644 index 000000000000..667b91b8dc5c --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-dont-use-xcb-in-wayland.patch @@ -0,0 +1,41 @@ +From 7a26f93cb579cf6b1cbc1e32790f93be70013157 Mon Sep 17 00:00:00 2001 +From: Xaver Hugl <xaver.hugl@gmail.com> +Date: Tue, 12 Apr 2022 15:45:52 +0200 +Subject: [PATCH] effects/kscreen: don't use xcb on Wayland + +BUG: 450564 +FIXED-IN: 5.24.5 +(cherry picked from commit db3f27336f2172fd70be3411874d9bbeb3db6a24) +--- + src/effects/kscreen/kscreen.cpp | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/effects/kscreen/kscreen.cpp b/src/effects/kscreen/kscreen.cpp +index 9484399756..0673915aad 100644 +--- a/src/effects/kscreen/kscreen.cpp ++++ b/src/effects/kscreen/kscreen.cpp +@@ -44,15 +44,15 @@ namespace KWin + + KscreenEffect::KscreenEffect() + : Effect() +- , m_atom(effects->announceSupportProperty("_KDE_KWIN_KSCREEN_SUPPORT", this)) ++ , m_atom(effects->waylandDisplay() ? XCB_ATOM_NONE : effects->announceSupportProperty("_KDE_KWIN_KSCREEN_SUPPORT", this)) + { + initConfig<KscreenConfig>(); +- connect(effects, &EffectsHandler::propertyNotify, this, &KscreenEffect::propertyNotify); +- connect(effects, &EffectsHandler::xcbConnectionChanged, this, +- [this] { ++ if (!effects->waylandDisplay()) { ++ connect(effects, &EffectsHandler::propertyNotify, this, &KscreenEffect::propertyNotify); ++ connect(effects, &EffectsHandler::xcbConnectionChanged, this, [this]() { + m_atom = effects->announceSupportProperty(QByteArrayLiteral("_KDE_KWIN_KSCREEN_SUPPORT"), this); +- } +- ); ++ }); ++ } + reconfigure(ReconfigureAll); + + const QList<EffectScreen *> screens = effects->screens(); +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-fix-current-VD-always-added.patch b/kde-plasma/kwin/files/kwin-5.24.4-fix-current-VD-always-added.patch new file mode 100644 index 000000000000..195d33b1f3a2 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-fix-current-VD-always-added.patch @@ -0,0 +1,50 @@ +From c1d7919ad7cc8a7e55f5b93ec84de63547bc53b9 Mon Sep 17 00:00:00 2001 +From: Ismael Asensio <isma.af@gmail.com> +Date: Fri, 8 Apr 2022 22:53:08 +0200 +Subject: [PATCH] AbstractClient: Fix the current VD being always added to the + plasma interface + +When setting-up the plasma window interface we need to call +`setOnAllDesktops()` after the actual virtual desktops have +been set. + +Otherwise, the current desktop would be always added to the +interface (as if the user were unsetting the "onAllDesktops" +flag) and the plasma interface and KWin can get un-synced, +specially if there are specific window rules. + +BUG: 452171 +FIXED-IN: 5.24.5 + + +(cherry picked from commit 4c8711f121430caa658f9848070e4e25c4a12208) +--- + src/abstract_client.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp +index 7e8a7eec04..0714b9ac3f 100644 +--- a/src/abstract_client.cpp ++++ b/src/abstract_client.cpp +@@ -1488,7 +1488,6 @@ void AbstractClient::setupWindowManagementInterface() + w->setKeepBelow(keepBelow()); + w->setMaximized(maximizeMode() == KWin::MaximizeFull); + w->setMinimized(isMinimized()); +- w->setOnAllDesktops(isOnAllDesktops()); + w->setDemandsAttention(isDemandingAttention()); + w->setCloseable(isCloseable()); + w->setMaximizeable(isMaximizable()); +@@ -1620,6 +1619,10 @@ void AbstractClient::setupWindowManagementInterface() + for (const auto vd : qAsConst(m_desktops)) { + w->addPlasmaVirtualDesktop(vd->id()); + } ++ // We need to set `OnAllDesktops` after the actual VD list has been added. ++ // Otherwise it will unconditionally add the current desktop to the interface ++ // which may not be the case, for example, when using rules ++ w->setOnAllDesktops(isOnAllDesktops()); + + //Plasma Virtual desktop management + //show/hide when the window enters/exits from desktop +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-fix-unlocking-wayland-sessions.patch b/kde-plasma/kwin/files/kwin-5.24.4-fix-unlocking-wayland-sessions.patch new file mode 100644 index 000000000000..9e9a4dabc998 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-fix-unlocking-wayland-sessions.patch @@ -0,0 +1,44 @@ +From ee625b2d8acad2ba81693107740a12d8a03863c0 Mon Sep 17 00:00:00 2001 +From: Aleix Pol <aleixpol@kde.org> +Date: Mon, 28 Mar 2022 03:40:12 +0200 +Subject: [PATCH] Fix unlocking wayland sessions + +We were never issuing a repaint which confused thoroughly the +compositor. + +BUG: 447705 +--- + src/wayland_server.cpp | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp +index eb3600f824..9e60787465 100644 +--- a/src/wayland_server.cpp ++++ b/src/wayland_server.cpp +@@ -15,6 +15,7 @@ + #include "inputpanelv1integration.h" + #include "keyboard_input.h" + #include "screens.h" ++#include "scene.h" + #include "layershellv1integration.h" + #include "main.h" + #include "xdgshellintegration.h" +@@ -610,6 +611,7 @@ void WaylandServer::initScreenLocker() + connect(seat, &KWaylandServer::SeatInterface::timestampChanged, + screenLockerApp, &ScreenLocker::KSldApp::userActivity); + } ++ Compositor::self()->scene()->addRepaintFull(); + } + ); + +@@ -627,6 +629,7 @@ void WaylandServer::initScreenLocker() + screenLockerApp, &ScreenLocker::KSldApp::userActivity); + } + ScreenLocker::KSldApp::self()->setWaylandFd(-1); ++ Compositor::self()->scene()->addRepaintFull(); + } + ); + +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-waylandserver-lockScreenShown.patch b/kde-plasma/kwin/files/kwin-5.24.4-waylandserver-lockScreenShown.patch new file mode 100644 index 000000000000..4defd5ae5945 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-waylandserver-lockScreenShown.patch @@ -0,0 +1,93 @@ +From 9d38f57d84fb9a6f2c4e60f7051f685842f34e0f Mon Sep 17 00:00:00 2001 +From: Xaver Hugl <xaver.hugl@gmail.com> +Date: Mon, 28 Mar 2022 18:08:59 +0200 +Subject: [PATCH] waylandserver: only signal lockScreenShown once it has + actually been shown + +When the system goes to suspend and screen locking for suspend is enabled, +suspend is inhibited until ScreenLocker::KSldApp::self()->lockScreenShown() +gets called, in order to make sure that the lockscreen is shown before the +system goes to standby, and thus also when the system wakes (instead of +potentially sensitive user information). +However, signalling that when the lockscreen gets mapped can't work reliably, +as it's then a matter of timing whether or not KWin actually presents an +image with the lockscreen before suspending. To fix that, this commit replaces +that logic with only calling lockScreenShown once every output actually got a +lockscreen presented. +--- + src/wayland_server.cpp | 25 +++++++++++++++++++++---- + src/wayland_server.h | 10 ++++++++++ + 2 files changed, 31 insertions(+), 4 deletions(-) + +diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp +index c850a1b697..6d5e1206a5 100644 +--- a/src/wayland_server.cpp ++++ b/src/wayland_server.cpp +@@ -213,10 +213,6 @@ KWaylandServer::ClientConnection *WaylandServer::inputMethodConnection() const + + void WaylandServer::registerShellClient(AbstractClient *client) + { +- if (client->isLockScreen()) { +- ScreenLocker::KSldApp::self()->lockScreenShown(); +- } +- + if (client->readyForPainting()) { + Q_EMIT shellClientAdded(client); + } else { +@@ -623,6 +619,8 @@ void WaylandServer::initScreenLocker() + m_screenLockerClientConnection = nullptr; + } + ++ new LockScreenPresentationWatcher(this); ++ + const QVector<SeatInterface *> seatIfaces = m_display->seats(); + for (auto *seat : seatIfaces) { + disconnect(seat, &KWaylandServer::SeatInterface::timestampChanged, +@@ -797,4 +795,23 @@ QString WaylandServer::socketName() const + return QString(); + } + ++WaylandServer::LockScreenPresentationWatcher::LockScreenPresentationWatcher(WaylandServer *server) ++{ ++ connect(server, &WaylandServer::shellClientAdded, this, [this](AbstractClient *client) { ++ if (client->isLockScreen()) { ++ connect(client->output()->renderLoop(), &RenderLoop::framePresented, this, [this, client]() { ++ // only signal lockScreenShown once all outputs have been presented at least once ++ m_signaledOutputs << client->output(); ++ if (m_signaledOutputs.size() == kwinApp()->platform()->enabledOutputs().size()) { ++ ScreenLocker::KSldApp::self()->lockScreenShown(); ++ delete this; ++ } ++ }); ++ } ++ }); ++ QTimer::singleShot(1000, this, [this]() { ++ ScreenLocker::KSldApp::self()->lockScreenShown(); ++ delete this; ++ }); ++} + } +diff --git a/src/wayland_server.h b/src/wayland_server.h +index bf1ba6eee5..58dda9a7a2 100644 +--- a/src/wayland_server.h ++++ b/src/wayland_server.h +@@ -243,6 +243,16 @@ private: + void handleOutputRemoved(AbstractOutput *output); + void handleOutputEnabled(AbstractOutput *output); + void handleOutputDisabled(AbstractOutput *output); ++ ++ class LockScreenPresentationWatcher : public QObject ++ { ++ public: ++ LockScreenPresentationWatcher(WaylandServer *server); ++ ++ private: ++ QSet<AbstractOutput *> m_signaledOutputs; ++ }; ++ + KWaylandServer::Display *m_display = nullptr; + KWaylandServer::CompositorInterface *m_compositor = nullptr; + KWaylandServer::SeatInterface *m_seat = nullptr; +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-waylandserver-move-LockScreenPresentationWatcher.patch b/kde-plasma/kwin/files/kwin-5.24.4-waylandserver-move-LockScreenPresentationWatcher.patch new file mode 100644 index 000000000000..0607e2ff3030 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-waylandserver-move-LockScreenPresentationWatcher.patch @@ -0,0 +1,36 @@ +From 388402c3b1b37d9f72597aae8d6670e8c0edeb14 Mon Sep 17 00:00:00 2001 +From: Xaver Hugl <xaver.hugl@gmail.com> +Date: Wed, 6 Apr 2022 21:08:25 +0200 +Subject: [PATCH] waylandserver: move LockScreenPresentationWatcher to the + correct place + +CCBUG: 452334 +--- + src/wayland_server.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/wayland_server.cpp b/src/wayland_server.cpp +index 6d5e1206a5..eb3600f824 100644 +--- a/src/wayland_server.cpp ++++ b/src/wayland_server.cpp +@@ -603,6 +603,8 @@ void WaylandServer::initScreenLocker() + } + ScreenLocker::KSldApp::self()->setWaylandFd(clientFd); + ++ new LockScreenPresentationWatcher(this); ++ + const QVector<SeatInterface *> seatIfaces = m_display->seats(); + for (auto *seat : seatIfaces) { + connect(seat, &KWaylandServer::SeatInterface::timestampChanged, +@@ -619,8 +621,6 @@ void WaylandServer::initScreenLocker() + m_screenLockerClientConnection = nullptr; + } + +- new LockScreenPresentationWatcher(this); +- + const QVector<SeatInterface *> seatIfaces = m_display->seats(); + for (auto *seat : seatIfaces) { + disconnect(seat, &KWaylandServer::SeatInterface::timestampChanged, +-- +GitLab + diff --git a/kde-plasma/kwin/files/kwin-5.24.4-xdgactivation-demand-attention.patch b/kde-plasma/kwin/files/kwin-5.24.4-xdgactivation-demand-attention.patch new file mode 100644 index 000000000000..8efa6b637222 --- /dev/null +++ b/kde-plasma/kwin/files/kwin-5.24.4-xdgactivation-demand-attention.patch @@ -0,0 +1,32 @@ +From 5390a4978f3a3903ede15ecd94a750b37931fbd2 Mon Sep 17 00:00:00 2001 +From: Aleix Pol <aleixpol@kde.org> +Date: Wed, 6 Apr 2022 00:33:21 +0200 +Subject: [PATCH] xdgactivation: Demand attention when a process fails to + resolve its token + +In xdg_activation_v1, if a process fails to negotiate activation, at +least decorate it as demanding attention. +This will give apps ways to indicate attention is required. It can can also +help detect clients doing weird things. + + +(cherry picked from commit 52035f43b90738e2efb4fd7b482719c1ea458578) +--- + src/xdgactivationv1.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/xdgactivationv1.cpp b/src/xdgactivationv1.cpp +index e2270a3393..97f8575c29 100644 +--- a/src/xdgactivationv1.cpp ++++ b/src/xdgactivationv1.cpp +@@ -76,6 +76,7 @@ void XdgActivationV1Integration::activateSurface(SurfaceInterface *surface, cons + + if (!m_currentActivationToken || m_currentActivationToken->token != token) { + qCDebug(KWIN_CORE) << "Refusing to activate " << client << " (provided token: " << token << ", current token:" << (m_currentActivationToken ? m_currentActivationToken->token : QStringLiteral("null")) << ")"; ++ client->demandAttention(); + return; + } + +-- +GitLab + |