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 | |
parent | 0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff) |
gentoo resync : 12.05.2022
Diffstat (limited to 'kde-plasma/kwin')
13 files changed, 596 insertions, 91 deletions
diff --git a/kde-plasma/kwin/Manifest b/kde-plasma/kwin/Manifest index 39b93c5b1d9f..777a8684cab2 100644 --- a/kde-plasma/kwin/Manifest +++ b/kde-plasma/kwin/Manifest @@ -1,7 +1,15 @@ AUX kwin-5.21.80-gstreamer-optional.patch 971 BLAKE2B f31d18f865a9108ff1bfb711ea95a281295487090be982719a8623faeb5fbc645b8c55468fdfa8482fc052b1546bb2445e4b150c10b239e1ca149f1402b97bff SHA512 cf08106ca39cb455044c47da104b66eb470b72573803a3a1fd6be0eaa58f80b9b7a163898a3234f28552214a1aa3d651f633490377bf87ec4d883878b115b7bc -AUX kwin-5.23.5-fix-ProvidersUrl.patch 3016 BLAKE2B b2deeca8ad365c932dad34762673947bf250fcdd9ed3692e34d3be51ac4470341f7f6d655aea99998629efa2d5128f1a1c46f6d89c3d56cdc7106b02af98eb7a SHA512 89a64c739aadd189593d84a0f403aa734c0aa7dac4103882f095330f6eaba5768a0c9d05c403e3e17c4888dee88e9438bd6f602c6f6fae56dc11262e41654e8c -DIST kwin-5.23.5.tar.xz 6347020 BLAKE2B 30a47d572665084aa4569dcfd525ac197648bcc32f2650460803eb592e34dd6e2395be2e491c76b71afe32968bdc2d6aa67dd6f8adb0f776366a7f9f48fb5047 SHA512 45bae86857391b9ce9eca8e75c664914b3b59d0327b670af8eaca6b2bd8008376ecb18347019906c9a9553c8767ea3e05d8ad81d57d4bfb3e91589ae27e3680f +AUX kwin-5.24.4-backends-drm-dont-perm-disable-vrr.patch 1143 BLAKE2B cf2957ffe9739826f31b4d9cb3657d4fa3eded789ba1bc3125c54a5d8aa6d32438c85d7305b64cbcc0e5e05220725001e5af3afa892ec06d6622cdca35b3de38 SHA512 fef2abe755ecf613df95fa85c3e12a083afa04d56262564c90c4a9a6f088f32986056bf9b4b85ff9ecc407c223d4f1f480c84394321a087048f58c72a71a557b +AUX kwin-5.24.4-backends-drm-fetch-immutable-blobs.patch 8361 BLAKE2B bbf3478d265290fd50597e063205404551243e30f157fa58a448e1b6b644f39c55a7b526d125fc399487e9cc36795e27e9ba793d1cd5ba19899a9eb56c1b0fd3 SHA512 28d981819f0d81e6498ad8c92cd9bd96808ab5b11cba946cef5318da273b4f107e0fcdeffc80bb46e5865d69a8bf50eb5febc3d2eb1ec3ac716495af3a030091 +AUX kwin-5.24.4-dont-send-geom-to-text-input.patch 1119 BLAKE2B ff8b13dfca5be2d0a3603599e80ed3b666ea61bfaddbcc19af57b70a82077d41736e0a3919a9c386e8d76233abdf6a9ddbc87e1a46a564c07dff98a2c60ee4bf SHA512 9388a6dac9c9c2a35c9eb6093571ff0f275a1720ac9a703c1dc134f06dfb7be4e0806ef26765b7cd3be4d53fef342345f2bba0980bfebf92fe8c5368c915d20a +AUX kwin-5.24.4-dont-use-xcb-in-wayland.patch 1593 BLAKE2B ddee202fb073af4331c77ea1013cb3b779a4ce8c6d5a6adeae9035edf051b1b6cce708ac64719e6d04c0cfa3a7e76599e233714c7137f05d8c9480293b95d6e0 SHA512 62a99855da7ec06ac35bd790d5d5bcc40c7e91ef5c66d99dae8bf8015742b9c9de60a52f565a0872cfa3e89ccfa26d2a62a223ec1d07fa97983e1ef508937b93 +AUX kwin-5.24.4-fix-current-VD-always-added.patch 1904 BLAKE2B bc8fbc8548e9e379281736ae2e388f81e11a61a7e881fd3b0bc87781cbd0d2dac15baa62a8a0ed501a3b92468f4bb729ce582b07953625e607bea1317ffdb17f SHA512 96ab4ebd818dc89055a66327c63cc8beca46d0797911d59c03125bfa0a07f602cfcefbf76a34648050c44e054dcc2b6f0c01f4531155438e504096436f806695 +AUX kwin-5.24.4-fix-unlocking-wayland-sessions.patch 1353 BLAKE2B 23dc90586cb7743a5009f5d4c7ffd4473a1df0ba62da8e55c3eb883dfc609b4d58483397b5f529e50e7beea4244416a32cf8bd2bf4220da1c9a1939b06385dbd SHA512 62e57a20a7de142f8ac8c4007a92f4cfa5fdcef7c06e5b2a706b610aa91d1268b9d88f725166477ba5438651787db37546b173e3b18fbe28f2dd2480e3ce564a +AUX kwin-5.24.4-waylandserver-lockScreenShown.patch 3721 BLAKE2B 70b8cd4bf8a571190c51e6b47427d875319726e1459f0084349d66adb77691b0cd6612192d8103e18e1b6f17335ac8e787c2a029703a44d5899c84d377914ad4 SHA512 5e30c5bfdc2fad74944f87d1e09d1a8a2bb4a64b31b1e8920814e3c680b6d5372b14f6abc356bbcbab77d8aaa6a4838549c881c7000e2b856138bf1fa765ab1f +AUX kwin-5.24.4-waylandserver-move-LockScreenPresentationWatcher.patch 1306 BLAKE2B 5511bb0c43c60df298cefe4ed53b76c906fb9935054cfbdc4c628425d3111e727d85b16b222e4d4b8a55908aec898536696594d929b56db23d8fe4cd1bcca82b SHA512 e672bf722b19e339b159710d3775f22f3d081c96b80a30d0f58d1bb078ddd4279aa402e1111b0612cbbeed36907d021755bd80fe7753aff1a67276681e390ea5 +AUX kwin-5.24.4-xdgactivation-demand-attention.patch 1235 BLAKE2B 49b7bca6c6009ffd1c9d94de6caab874f45a54f846f813c659bb63a3775aea2f5280f0f2728fcdd4e8d90a28c49b46dedbb5289e3d41c110a7ccbb480f465076 SHA512 35ecb28484b0f07b026d8875b4c5cabfb05f563259920c76d6bb1c0cd2339891540c6aab8f763e034d52c90e45bafb5c607fd18e602791d75f9e92fef9162a00 DIST kwin-5.24.4.tar.xz 6448844 BLAKE2B 3e58ae22d2ff254f4c08a8c6662702e5dae97dd207ca8d1d51cc203826d4b68a5eecffea69cd6eb4de5894e09e73340cda540e41db3753873cab72a76936e6d4 SHA512 2e1389a68e373791bd397294c834fb1cdbab24f32253eeaf505bb1878b8a8a5cd02d1250cae181c00dc73d6a524ff44cd1fbf2e101f13adf915f30f15c738df3 -EBUILD kwin-5.23.5-r1.ebuild 4125 BLAKE2B a1b40580c45afdfa9ad35b97119db55084648e314f283749fcb1509e5939e0bcba83499210baf017fc0c50e72929f3f079a020aefadae5a9c429db77dd445978 SHA512 5a39ecf522c6af23003e1c3ebce9bc76ac5d9b2899d647a60b09b559b09b419ef494ed3de5bbd60840f80145a96c07a9f791356d376cc588fa00749e88cdf0fc -EBUILD kwin-5.24.4.ebuild 4041 BLAKE2B 0156a737bebe18f6b4e4287098dfe0805209cdc47dd82653a5a8d378eb22cc3a51092fc6d7cb967b5146c199321fc27e2b1087fe832d1ee33dbf58ceb70ff305 SHA512 cf690a9afabbf810627c01644cf9827fffea4372bf58579a97cb98b6829f8240e1d37f5330f7eae3e7b1ee412e7ba16c9716b4d270105e060fe18fcf22da5f2f +DIST kwin-5.24.5.tar.xz 6453932 BLAKE2B cd042dd8c9168e11bc39d15969c57a97fd5c47b1af3e3a6235cabad166c4925c51541d52f7bf96f3132b3ecfeb91547845d6af3893ab5f31b41df4a926e83993 SHA512 4fad8b39a588a44f89e2640358d8e563047fa889a9bdaf246c1c87d320aa5f5b9d3d6bef702314fb06d2bfe16d0445efe736de60d94b4409f9b5efcdac48d089 +EBUILD kwin-5.24.4-r1.ebuild 4603 BLAKE2B 25641eac46f94b51f9f7e5219cdcc0318f4c2af271ff1c6931cca5d6a420ad6bea85008ecff4004710e7ba4adcfe32f15456f68ee7d45aaa25089f92da8c2676 SHA512 e2581f0c225ea409a480148c4e083b7c6ca849de78a98cab104844f0fe7b73562e4d53a69b349094bc53303c7207d2115693670a6bc12c4a8d94fbdfff055749 +EBUILD kwin-5.24.5.ebuild 3999 BLAKE2B e8ce73997e57a5950ea0845dfd9483bdeccb4f3fe579527fc71fcf1f20ffadd9c0b7e3a3c096de5d7a14a7558a28d798a7a154da046525b70bbc3ec1864e7ff9 SHA512 59ca2792f3da48edf46acf1183fae9f69bd9ec344631e264cd8f761cd74257a195eaa29abc48e43b8e41b6272c9f01404fc88a87aa3b61acd11f52ca89ff5879 MISC metadata.xml 512 BLAKE2B 3e81119dbc98181573e294885c52623e4799b55c238ca9513e33547e718ec0f1762371d6391a4291c54159f31cd510cd8d9c192aa16ef0fc16672a3d0ef25dbe SHA512 a9a28562cb0f25abf24cb89c48fea816bfaf701c889ee08e66b80b3afe434af68e5ddb0fa21d313d68418c81a1e73eefcabf75e8e3878f55a1292039dde6ecdb 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 + diff --git a/kde-plasma/kwin/kwin-5.23.5-r1.ebuild b/kde-plasma/kwin/kwin-5.24.4-r1.ebuild index 744aefd646ac..354b862b91c3 100644 --- a/kde-plasma/kwin/kwin-5.23.5-r1.ebuild +++ b/kde-plasma/kwin/kwin-5.24.4-r1.ebuild @@ -5,7 +5,7 @@ EAPI=8 ECM_HANDBOOK="optional" ECM_TEST="optional" -KFMIN=5.86.0 +KFMIN=5.90.0 PVCUT=$(ver_cut 1-3) QTMIN=5.15.2 VIRTUALX_REQUIRED="test" @@ -21,7 +21,7 @@ IUSE="accessibility caps gles2-only multimedia plasma screencast" RESTRICT="test" COMMON_DEPEND=" - >=dev-libs/libinput-1.14 + >=dev-libs/libinput-1.19 >=dev-libs/wayland-1.2 >=dev-qt/qtdbus-${QTMIN}:5 >=dev-qt/qtdeclarative-${QTMIN}:5 @@ -36,6 +36,7 @@ COMMON_DEPEND=" >=kde-frameworks/kconfigwidgets-${KFMIN}:5 >=kde-frameworks/kcoreaddons-${KFMIN}:5 >=kde-frameworks/kcrash-${KFMIN}:5 + >=kde-frameworks/kdbusaddons-${KFMIN}:5 >=kde-frameworks/kdeclarative-${KFMIN}:5 >=kde-frameworks/kglobalaccel-${KFMIN}:5= >=kde-frameworks/ki18n-${KFMIN}:5 @@ -95,16 +96,20 @@ DEPEND="${COMMON_DEPEND} >=dev-libs/wayland-protocols-1.19 ) " -BDEPEND=" - test? ( || ( - >=dev-qt/qtwaylandscanner-${QTMIN}:5 - <dev-qt/qtwayland-5.15.3:5 - ) ) -" +BDEPEND="test? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )" PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" -# https://mail.kde.org/pipermail/distributions/2022-February/001127.html -PATCHES=( "${FILESDIR}/${P}-fix-ProvidersUrl.patch" ) +PATCHES=( + "${FILESDIR}"/${P}-waylandserver-lockScreenShown.patch + "${FILESDIR}"/${P}-xdgactivation-demand-attention.patch + "${FILESDIR}"/${P}-waylandserver-move-LockScreenPresentationWatcher.patch + "${FILESDIR}"/${P}-backends-drm-dont-perm-disable-vrr.patch + "${FILESDIR}"/${P}-backends-drm-fetch-immutable-blobs.patch # KDE-bug 449285 + "${FILESDIR}"/${P}-dont-send-geom-to-text-input.patch + "${FILESDIR}"/${P}-fix-current-VD-always-added.patch # KDE-bug 452171 + "${FILESDIR}"/${P}-dont-use-xcb-in-wayland.patch # KDE-bug 450564 + "${FILESDIR}"/${P}-fix-unlocking-wayland-sessions.patch # KDE-bug 447705 +) src_prepare() { ecm_src_prepare diff --git a/kde-plasma/kwin/kwin-5.24.4.ebuild b/kde-plasma/kwin/kwin-5.24.5.ebuild index 7c0506735d47..a47f4289b4c9 100644 --- a/kde-plasma/kwin/kwin-5.24.4.ebuild +++ b/kde-plasma/kwin/kwin-5.24.5.ebuild @@ -96,12 +96,7 @@ DEPEND="${COMMON_DEPEND} >=dev-libs/wayland-protocols-1.19 ) " -BDEPEND=" - test? ( || ( - >=dev-qt/qtwaylandscanner-${QTMIN}:5 - <dev-qt/qtwayland-5.15.3:5 - ) ) -" +BDEPEND="test? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )" PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5" src_prepare() { |