public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2020-05-16 22:38 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2020-05-16 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     fc03ea97850597e3d1f70a5189080af4078ee272
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 22:02:17 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 16 22:38:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc03ea97

kde-plasma/kwin: Don't exec() QDialog

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=421
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin/files/kwin-5.18.5-dont-exec-QDialog.patch | 149 +++++++++++++++++++++
 kde-plasma/kwin/kwin-5.18.5-r1.ebuild              | 116 ++++++++++++++++
 2 files changed, 265 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.18.5-dont-exec-QDialog.patch b/kde-plasma/kwin/files/kwin-5.18.5-dont-exec-QDialog.patch
new file mode 100644
index 00000000000..df65c32fb13
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.18.5-dont-exec-QDialog.patch
@@ -0,0 +1,149 @@
+From 5ea54eda5d1f91428933d338ea8b950aea86d43a Mon Sep 17 00:00:00 2001
+From: Kai Uwe Broulik <kde@privat.broulik.de>
+Date: Wed, 6 May 2020 15:15:03 +0200
+Subject: [kcmkwin/kwindecoration] Don't exec() QDialog
+
+Using nested event loops with QML is always troublesome.
+
+BUG: 421053
+FIXED-IN: 5.18.6
+
+Differential Revision: https://phabricator.kde.org/D29473
+---
+ .../declarative-plugin/previewbridge.cpp           | 32 +++++++++++++++-------
+ .../declarative-plugin/previewbridge.h             |  4 ++-
+ .../kwindecoration/package/contents/ui/Themes.qml  |  3 +-
+ 3 files changed, 27 insertions(+), 12 deletions(-)
+
+diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp
+index bad4cc1..83a9bd9 100644
+--- a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp
++++ b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.cpp
+@@ -36,7 +36,11 @@
+ #include <QDialog>
+ #include <QDialogButtonBox>
+ #include <QPushButton>
++#include <QQuickItem>
++#include <QQuickRenderControl>
++#include <QQuickWindow>
+ #include <QVBoxLayout>
++#include <QWindow>
+ 
+ namespace KDecoration2
+ {
+@@ -173,15 +177,16 @@ DecorationButton *PreviewBridge::createButton(KDecoration2::Decoration *decorati
+     return m_factory->create<KDecoration2::DecorationButton>(QStringLiteral("button"), parent, QVariantList({QVariant::fromValue(type), QVariant::fromValue(decoration)}));
+ }
+ 
+-void PreviewBridge::configure()
++void PreviewBridge::configure(QQuickItem *ctx)
+ {
+     if (!m_valid) {
+         return;
+     }
+     //setup the UI
+-    QDialog dialog;
++    QDialog *dialog = new QDialog();
++    dialog->setAttribute(Qt::WA_DeleteOnClose);
+     if (m_lastCreatedClient) {
+-        dialog.setWindowTitle(m_lastCreatedClient->caption());
++        dialog->setWindowTitle(m_lastCreatedClient->caption());
+     }
+ 
+     // create the KCModule through the plugintrader
+@@ -189,7 +194,7 @@ void PreviewBridge::configure()
+     if (!m_theme.isNull()) {
+         args.insert(QStringLiteral("theme"), m_theme);
+     }
+-    KCModule *kcm = m_factory->create<KCModule>(QStringLiteral("kcmodule"), &dialog, QVariantList({args}));
++    KCModule *kcm = m_factory->create<KCModule>(QStringLiteral("kcmodule"), dialog, QVariantList({args}));
+     if (!kcm) {
+         return;
+     }
+@@ -205,28 +210,35 @@ void PreviewBridge::configure()
+                                                           QStringLiteral("reloadConfig"));
+         QDBusConnection::sessionBus().send(message);
+     };
+-    connect(&dialog, &QDialog::accepted, this, save);
++    connect(dialog, &QDialog::accepted, this, save);
+ 
+     QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Ok |
+                                                      QDialogButtonBox::Cancel |
+                                                      QDialogButtonBox::RestoreDefaults |
+                                                      QDialogButtonBox::Reset,
+-                                                     &dialog);
++                                                     dialog);
+ 
+     QPushButton *reset = buttons->button(QDialogButtonBox::Reset);
+     reset->setEnabled(false);
+     // Here we connect our buttons with the dialog
+-    connect(buttons, &QDialogButtonBox::accepted, &dialog, &QDialog::accept);
+-    connect(buttons, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);
++    connect(buttons, &QDialogButtonBox::accepted, dialog, &QDialog::accept);
++    connect(buttons, &QDialogButtonBox::rejected, dialog, &QDialog::reject);
+     connect(reset, &QPushButton::clicked, kcm, &KCModule::load);
+     auto changedSignal = static_cast<void(KCModule::*)(bool)>(&KCModule::changed);
+     connect(kcm, changedSignal, reset, &QPushButton::setEnabled);
+     connect(buttons->button(QDialogButtonBox::RestoreDefaults), &QPushButton::clicked, kcm, &KCModule::defaults);
+ 
+-    QVBoxLayout *layout = new QVBoxLayout(&dialog);
++    QVBoxLayout *layout = new QVBoxLayout(dialog);
+     layout->addWidget(kcm);
+     layout->addWidget(buttons);
+-    dialog.exec();
++
++    if (ctx->window()) {
++        dialog->winId(); // so it creates windowHandle
++        dialog->windowHandle()->setTransientParent(QQuickRenderControl::renderWindowFor(ctx->window()));
++        dialog->setModal(true);
++    }
++
++    dialog->show();
+ }
+ 
+ BridgeItem::BridgeItem(QObject *parent)
+diff --git a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h
+index 7e1d8f3..85fccbe 100644
+--- a/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h
++++ b/kcmkwin/kwindecoration/declarative-plugin/previewbridge.h
+@@ -26,6 +26,8 @@
+ #include <QList>
+ #include <QPointer>
+ 
++class QQuickItem;
++
+ class KPluginFactory;
+ 
+ namespace KDecoration2
+@@ -70,7 +72,7 @@ public:
+     KDecoration2::DecorationButton *createButton(KDecoration2::Decoration *decoration, KDecoration2::DecorationButtonType type, QObject *parent = nullptr);
+ 
+ public Q_SLOTS:
+-    void configure();
++    void configure(QQuickItem *ctx);
+ 
+ Q_SIGNALS:
+     void pluginChanged();
+diff --git a/kcmkwin/kwindecoration/package/contents/ui/Themes.qml b/kcmkwin/kwindecoration/package/contents/ui/Themes.qml
+index 28e5899..1eeb4cd 100644
+--- a/kcmkwin/kwindecoration/package/contents/ui/Themes.qml
++++ b/kcmkwin/kwindecoration/package/contents/ui/Themes.qml
+@@ -40,6 +40,7 @@ KCM.GridView {
+     view.implicitCellWidth: Kirigami.Units.gridUnit * 18
+ 
+     view.delegate: KCM.GridDelegate {
++        id: delegate
+         text: model.display
+ 
+         thumbnailAvailable: true
+@@ -101,7 +102,7 @@ KCM.GridView {
+                 onTriggered: {
+                     kcm.theme = index
+                     view.currentIndex = index
+-                    bridgeItem.bridge.configure()
++                    bridgeItem.bridge.configure(delegate)
+                 }
+             }
+         ]
+-- 
+cgit v1.1

diff --git a/kde-plasma/kwin/kwin-5.18.5-r1.ebuild b/kde-plasma/kwin/kwin-5.18.5-r1.ebuild
new file mode 100644
index 00000000000..c755f96bbcf
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.18.5-r1.ebuild
@@ -0,0 +1,116 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.66.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.12.3
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="caps gles2-only multimedia"
+
+COMMON_DEPEND="
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kcrash-${KFMIN}:5
+	>=kde-frameworks/kdeclarative-${KFMIN}:5
+	>=kde-frameworks/kglobalaccel-${KFMIN}:5=
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/kinit-${KFMIN}:5
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	>=kde-plasma/kscreenlocker-${PVCUT}:5
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[gles2-only=]
+	>=dev-qt/qtscript-${QTMIN}:5
+	>=dev-qt/qtsensors-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=dev-libs/libinput-1.9
+	>=dev-libs/wayland-1.2
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libepoxy
+	media-libs/mesa[egl,gbm,wayland,X(+)]
+	virtual/libudev:=
+	x11-libs/libICE
+	x11-libs/libSM
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+"
+RDEPEND="${COMMON_DEPEND}
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+"
+PDEPEND="
+	>=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+RESTRICT+=" test"
+
+PATCHES=(
+	# in Plasma/5.18
+	"${FILESDIR}/${P}-dont-exec-QDialog.patch" # KDE-bug 421053
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.16.80-gstreamer-optional.patch"
+
+	# Access violations, bug #640432
+	sed -e "s/^ecm_find_qmlmodule.*QtMultimedia/#&/" \
+		-i CMakeLists.txt || die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package caps Libcap)
+	)
+
+	ecm_src_configure
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2024-08-11  6:54 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2024-08-11  6:54 UTC (permalink / raw
  To: gentoo-commits

commit:     c8fbaf4ed30ec52079eb79458e71cacc450a8217
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 10 11:03:52 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 06:52:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8fbaf4e

kde-plasma/kwin: Depend on ECM 6.5.0 w/ fixed FindWaylandScanner

Also backporting commit d85dd623d7315f2e620c2c37e635f2fd3737a684
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=450579

Bug: https://bugs.gentoo.org/933271
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin/files/kwin-6.1.4-screenedge-dnd.patch     |  34 +++++
 kde-plasma/kwin/kwin-6.1.4-r1.ebuild               | 145 +++++++++++++++++++++
 2 files changed, 179 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-6.1.4-screenedge-dnd.patch b/kde-plasma/kwin/files/kwin-6.1.4-screenedge-dnd.patch
new file mode 100644
index 000000000000..864835bee661
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-6.1.4-screenedge-dnd.patch
@@ -0,0 +1,34 @@
+From d85dd623d7315f2e620c2c37e635f2fd3737a684 Mon Sep 17 00:00:00 2001
+From: Yifan Zhu <fanzhuyifan@gmail.com>
+Date: Wed, 7 Aug 2024 16:54:44 +0000
+Subject: [PATCH] screenedge: allow activating clients in drag and drop
+
+In particular, this allows dragging onto autohide and dogde-window
+panels.
+
+BUG: 450579
+
+
+(cherry picked from commit 7752db3a882b5432d7d5c0b118acf42eeb3a8aee)
+
+Co-authored-by: Yifan Zhu <fanzhuyifan@gmail.com>
+---
+ src/screenedge.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/screenedge.cpp b/src/screenedge.cpp
+index de9f55dcb69..b1b2a29f9e3 100644
+--- a/src/screenedge.cpp
++++ b/src/screenedge.cpp
+@@ -244,7 +244,7 @@ bool Edge::activatesForPointer() const
+     // Most actions do not handle drag and drop properly yet
+     // but at least allow "show desktop" and "application launcher".
+     if (waylandServer() && waylandServer()->seat()->isDragPointer()) {
+-        if (!m_edges->isDesktopSwitching() && m_action != ElectricActionShowDesktop && m_action != ElectricActionApplicationLauncher) {
++        if (!m_edges->isDesktopSwitching() && m_action != ElectricActionNone && m_action != ElectricActionShowDesktop && m_action != ElectricActionApplicationLauncher) {
+             return false;
+         }
+         // Don't activate edge when a mouse button is pressed, except when
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-6.1.4-r1.ebuild b/kde-plasma/kwin/kwin-6.1.4-r1.ebuild
new file mode 100644
index 000000000000..b759cc819a2d
--- /dev/null
+++ b/kde-plasma/kwin/kwin-6.1.4-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="true"
+KFMIN=6.5.0 # bug 933271
+PVCUT=$(ver_cut 1-3)
+QTMIN=6.7.2
+inherit ecm plasma.kde.org
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="6"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="accessibility +caps gles2-only lock screencast +shortcuts systemd"
+
+RESTRICT="test"
+
+# qtbase slot op: GuiPrivate use in tabbox
+COMMON_DEPEND="
+	dev-libs/libei
+	>=dev-libs/libinput-1.19:=
+	>=dev-libs/wayland-1.22.0
+	>=dev-qt/qt5compat-${QTMIN}:6[qml]
+	>=dev-qt/qtbase-${QTMIN}:6=[accessibility=,gles2-only=,gui,libinput,opengl,widgets]
+	>=dev-qt/qtdeclarative-${QTMIN}:6
+	>=dev-qt/qtsensors-${QTMIN}:6
+	>=dev-qt/qtshadertools-${QTMIN}:6
+	>=kde-frameworks/kauth-${KFMIN}:6
+	>=kde-frameworks/kcmutils-${KFMIN}:6
+	>=kde-frameworks/kcolorscheme-${KFMIN}:6
+	>=kde-frameworks/kconfig-${KFMIN}:6[qml]
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:6
+	>=kde-frameworks/kcoreaddons-${KFMIN}:6
+	>=kde-frameworks/kcrash-${KFMIN}:6
+	>=kde-frameworks/kdbusaddons-${KFMIN}:6
+	>=kde-frameworks/kdeclarative-${KFMIN}:6
+	>=kde-frameworks/kglobalaccel-${KFMIN}:6=[X(+)]
+	>=kde-frameworks/kguiaddons-${KFMIN}:6[wayland]
+	>=kde-frameworks/ki18n-${KFMIN}:6
+	>=kde-frameworks/kidletime-${KFMIN}:6=[wayland]
+	>=kde-frameworks/knewstuff-${KFMIN}:6
+	>=kde-frameworks/knotifications-${KFMIN}:6
+	>=kde-frameworks/kpackage-${KFMIN}:6
+	>=kde-frameworks/kservice-${KFMIN}:6
+	>=kde-frameworks/ksvg-${KFMIN}:6
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:6
+	>=kde-frameworks/kwindowsystem-${KFMIN}:6=[wayland,X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:6
+	>=kde-plasma/breeze-${PVCUT}:6
+	>=kde-plasma/kdecoration-${PVCUT}:6
+	>=kde-plasma/kwayland-${PVCUT}:6
+	>=kde-plasma/plasma-activities-${PVCUT}:6
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libdisplay-info:=
+	media-libs/libepoxy
+	media-libs/libglvnd
+	>=media-libs/mesa-21.3[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	>=x11-libs/libdrm-2.4.116
+	>=x11-libs/libxcb-1.10:=
+	>=x11-libs/libxcvt-0.1.1
+	>=x11-libs/libxkbcommon-1.5.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:6 )
+	gles2-only? ( || (
+		>=media-libs/mesa-24.1.0_rc1[opengl]
+		<media-libs/mesa-24.1.0_rc1[gles2]
+	) )
+	lock? ( >=kde-plasma/kscreenlocker-${PVCUT}:6 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+	shortcuts? ( >=kde-plasma/kglobalacceld-${PVCUT}:6 )
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-plasma/kdeplasma-addons:5
+	!kde-plasma/kwayland-server
+	>=dev-qt/qtmultimedia-${QTMIN}:6[qml]
+	|| (
+		dev-qt/qtmultimedia:6[ffmpeg]
+		(
+			dev-qt/qtmultimedia:6[gstreamer]
+			media-plugins/gst-plugins-soup:1.0
+		)
+	)
+	>=kde-frameworks/kirigami-${KFMIN}:6
+	>=kde-frameworks/kitemmodels-${KFMIN}:6
+	>=kde-plasma/libplasma-${PVCUT}:6[wayland(+)]
+	sys-apps/hwdata
+	x11-base/xwayland[libei]
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/plasma-wayland-protocols-1.13.0
+	>=dev-libs/wayland-protocols-1.34
+	>=dev-qt/qttools-${QTMIN}:6[widgets]
+	>=dev-qt/qtbase-${QTMIN}:6[concurrent]
+	>=dev-qt/qtwayland-${QTMIN}:6
+	x11-base/xorg-proto
+	x11-libs/xcb-util-image
+	caps? ( sys-libs/libcap )
+	test? ( screencast? ( >=kde-plasma/kpipewire-${PVCUT}:6 ) )
+"
+BDEPEND="
+	>=dev-qt/qtwayland-${QTMIN}:6
+	dev-util/wayland-scanner
+	>=kde-frameworks/kcmutils-${KFMIN}:6
+"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:*"
+
+PATCHES=( "${FILESDIR}/${P}-screenedge-dnd.patch" ) # KDE-bug 450579, in 6.1.5
+
+src_prepare() {
+	ecm_src_prepare
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+
+	# TODO: try to get a build switch upstreamed
+	if ! use systemd; then
+		sed -e "s/^pkg_check_modules.*libsystemd/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		# TODO: KWIN_BUILD_X11?
+		# KWIN_BUILD_NOTIFICATIONS exists, but kdeclarative still hard-depends on it
+		$(cmake_use_find_package accessibility QAccessibilityClient6)
+		$(cmake_use_find_package caps Libcap)
+		-DKWIN_BUILD_SCREENLOCKER=$(usex lock)
+		-DKWIN_BUILD_GLOBALSHORTCUTS=$(usex shortcuts)
+	)
+
+	ecm_src_configure
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2024-03-08 20:44 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2024-03-08 20:44 UTC (permalink / raw
  To: gentoo-commits

commit:     c8d1666f0c223f9a93c7da7820e0a687b1db67b1
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 23:53:34 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 20:42:28 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8d1666f

kde-plasma/kwin: Drop dev-qt/qtmultimedia[gstreamer] USEdep

Qt6Multimedia ensures a video backend is available, w/ ffmpeg as default.

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kwin-5.90.90-gstreamer-optional.patch    | 25 ----------------------
 .../{kwin-6.0.1-r1.ebuild => kwin-6.0.1-r2.ebuild} | 15 +++++++------
 kde-plasma/kwin/metadata.xml                       |  1 +
 3 files changed, 10 insertions(+), 31 deletions(-)

diff --git a/kde-plasma/kwin/files/kwin-5.90.90-gstreamer-optional.patch b/kde-plasma/kwin/files/kwin-5.90.90-gstreamer-optional.patch
deleted file mode 100644
index dfd544af0058..000000000000
--- a/kde-plasma/kwin/files/kwin-5.90.90-gstreamer-optional.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 3b851958984a2028780ee6078004690ca2b0723b Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Tue, 6 Aug 2019 22:36:44 +0200
-Subject: [PATCH] Disable the effect video button if gstreamer is missing
-
----
- src/kcms/effects/ui/Effect.qml | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/kcms/effects/ui/Effect.qml b/src/kcms/effects/ui/Effect.qml
-index e4a7daca7e..23d32e63a1 100644
---- a/src/kcms/effects/ui/Effect.qml
-+++ b/src/kcms/effects/ui/Effect.qml
-@@ -120,7 +120,7 @@ QQC2.ItemDelegate {
-         }
- 
-         QQC2.ToolButton {
--            visible: model.VideoRole.toString() !== ""
-+            visible: false
-             icon.name: "videoclip-amarok"
-             text: i18nc("@info:tooltip", "Show/Hide Video")
-             display: QQC2.AbstractButton.IconOnly
--- 
-2.43.0
-

diff --git a/kde-plasma/kwin/kwin-6.0.1-r1.ebuild b/kde-plasma/kwin/kwin-6.0.1-r2.ebuild
similarity index 93%
rename from kde-plasma/kwin/kwin-6.0.1-r1.ebuild
rename to kde-plasma/kwin/kwin-6.0.1-r2.ebuild
index 0968b936c57a..cb808dc2ddd8 100644
--- a/kde-plasma/kwin/kwin-6.0.1-r1.ebuild
+++ b/kde-plasma/kwin/kwin-6.0.1-r2.ebuild
@@ -15,7 +15,7 @@ DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
 LICENSE="GPL-2+"
 SLOT="6"
 KEYWORDS="~amd64"
-IUSE="accessibility caps gles2-only lock multimedia screencast +shortcuts"
+IUSE="accessibility caps gles2-only lock screencast +shortcuts"
 
 RESTRICT="test"
 
@@ -78,15 +78,19 @@ COMMON_DEPEND="
 RDEPEND="${COMMON_DEPEND}
 	!kde-plasma/kdeplasma-addons:5
 	!kde-plasma/kwayland-server
+	>=dev-qt/qtmultimedia-${QTMIN}:6[qml]
+	|| (
+		dev-qt/qtmultimedia:6[ffmpeg]
+		(
+			dev-qt/qtmultimedia:6[gstreamer]
+			media-plugins/gst-plugins-soup:1.0
+		)
+	)
 	>=kde-frameworks/kirigami-${KFMIN}:6
 	>=kde-frameworks/kitemmodels-${KFMIN}:6
 	>=kde-plasma/libplasma-${PVCUT}:6[wayland]
 	sys-apps/hwdata
 	x11-base/xwayland
-	multimedia? (
-		>=dev-qt/qtmultimedia-${QTMIN}:6[gstreamer,qml]
-		media-plugins/gst-plugins-soup:1.0
-	)
 "
 DEPEND="${COMMON_DEPEND}
 	>=dev-libs/plasma-wayland-protocols-1.11.1
@@ -108,7 +112,6 @@ PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:*"
 
 src_prepare() {
 	ecm_src_prepare
-	use multimedia || eapply "${FILESDIR}/${PN}-5.90.90-gstreamer-optional.patch"
 
 	# TODO: try to get a build switch upstreamed
 	if ! use screencast; then

diff --git a/kde-plasma/kwin/metadata.xml b/kde-plasma/kwin/metadata.xml
index 74751f22f2b9..4903bdce5a1e 100644
--- a/kde-plasma/kwin/metadata.xml
+++ b/kde-plasma/kwin/metadata.xml
@@ -11,6 +11,7 @@
 	<use>
 		<flag name="lock">Enable screen locking via <pkg>kde-plasma/kscreenlocker</pkg></flag>
 		<flag name="multimedia">Enable effect video button in desktop effects KCM</flag>
+		<flag name="screencast">Enable screencast portal using <pkg>media-video/pipewire</pkg></flag>
 		<flag name="shortcuts">Enable global shortcuts support via <pkg>kde-plasma/kglobalacceld</pkg></flag>
 	</use>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2023-11-11  8:37 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2023-11-11  8:37 UTC (permalink / raw
  To: gentoo-commits

commit:     67f76e16dd6a1e9038fcc22317bf761f1a128140
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 10 21:17:46 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Nov 11 08:36:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67f76e16

kde-plasma/kwin: xdgshellwindow: enforce a minimum size for clients

KDE-Bug: https://bugs.kde.org/469237

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...in-5.27.9-xdgshellwindow-enforce-min-size.patch | 71 ++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.27.9-r1.ebuild              |  2 +
 2 files changed, 73 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch b/kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch
new file mode 100644
index 000000000000..471a37a3e0bd
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.9-xdgshellwindow-enforce-min-size.patch
@@ -0,0 +1,71 @@
+From 0900264e6f538ff915186b1bd9e528e568b28c1d Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Wed, 23 Aug 2023 21:51:18 +0200
+Subject: [PATCH] xdgshellwindow: enforce a minimum size for clients
+
+It doesn't make sense for a window to become 1x1 pixels small. When we have
+server side decorations we also know that the decoration takes a lot of
+space, so this commit enforces a bigger minimum size for decorated windows
+
+BUG: 469237
+
+
+(cherry picked from commit 28c27609a4b45cf08b53dcc7dfe90f23c3338797)
+---
+ autotests/integration/xdgshellwindow_test.cpp | 8 ++++----
+ src/xdgshellwindow.cpp                        | 3 ++-
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/autotests/integration/xdgshellwindow_test.cpp b/autotests/integration/xdgshellwindow_test.cpp
+index 70716e49434..53489a27f6b 100644
+--- a/autotests/integration/xdgshellwindow_test.cpp
++++ b/autotests/integration/xdgshellwindow_test.cpp
+@@ -375,12 +375,12 @@ void TestXdgShellWindow::testFullscreen()
+     QVERIFY(surfaceConfigureRequestedSpy.wait());
+ 
+     shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
+-    auto window = Test::renderAndWaitForShown(surface.get(), QSize(100, 50), Qt::blue);
++    auto window = Test::renderAndWaitForShown(surface.get(), QSize(500, 250), Qt::blue);
+     QVERIFY(window);
+     QVERIFY(window->isActive());
+     QCOMPARE(window->layer(), NormalLayer);
+     QVERIFY(!window->isFullScreen());
+-    QCOMPARE(window->clientSize(), QSize(100, 50));
++    QCOMPARE(window->clientSize(), QSize(500, 250));
+     QCOMPARE(window->isDecorated(), decoMode == Test::XdgToplevelDecorationV1::mode_server_side);
+     QCOMPARE(window->clientSizeToFrameSize(window->clientSize()), window->size());
+ 
+@@ -417,14 +417,14 @@ void TestXdgShellWindow::testFullscreen()
+     QCOMPARE(surfaceConfigureRequestedSpy.count(), 4);
+     states = toplevelConfigureRequestedSpy.last().at(1).value<Test::XdgToplevel::States>();
+     QVERIFY(!(states & Test::XdgToplevel::State::Fullscreen));
+-    QCOMPARE(toplevelConfigureRequestedSpy.last().at(0).value<QSize>(), QSize(100, 50));
++    QCOMPARE(toplevelConfigureRequestedSpy.last().at(0).value<QSize>(), QSize(500, 250));
+ 
+     shellSurface->xdgSurface()->ack_configure(surfaceConfigureRequestedSpy.last().at(0).value<quint32>());
+     Test::render(surface.get(), toplevelConfigureRequestedSpy.last().at(0).value<QSize>(), Qt::blue);
+ 
+     QVERIFY(fullScreenChangedSpy.wait());
+     QCOMPARE(fullScreenChangedSpy.count(), 2);
+-    QCOMPARE(window->clientSize(), QSize(100, 50));
++    QCOMPARE(window->clientSize(), QSize(500, 250));
+     QVERIFY(!window->isFullScreen());
+     QCOMPARE(window->isDecorated(), decoMode == Test::XdgToplevelDecorationV1::mode_server_side);
+     QCOMPARE(window->layer(), NormalLayer);
+diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp
+index 34201bdd05b..29d8623cac3 100644
+--- a/src/xdgshellwindow.cpp
++++ b/src/xdgshellwindow.cpp
+@@ -600,7 +600,8 @@ MaximizeMode XdgToplevelWindow::requestedMaximizeMode() const
+ 
+ QSizeF XdgToplevelWindow::minSize() const
+ {
+-    return rules()->checkMinSize(m_shellSurface->minimumSize());
++    const int enforcedMinimum = m_nextDecoration ? 150 : 20;
++    return rules()->checkMinSize(QSize(std::max(enforcedMinimum, m_shellSurface->minimumSize().width()), std::max(enforcedMinimum, m_shellSurface->minimumSize().height())));
+ }
+ 
+ QSizeF XdgToplevelWindow::maxSize() const
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.27.9-r1.ebuild b/kde-plasma/kwin/kwin-5.27.9-r1.ebuild
index 8f4aa4f45ebd..348e6879fbc6 100644
--- a/kde-plasma/kwin/kwin-5.27.9-r1.ebuild
+++ b/kde-plasma/kwin/kwin-5.27.9-r1.ebuild
@@ -100,6 +100,8 @@ BDEPEND="
 "
 PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
 
+PATCHES=( "${FILESDIR}/${P}-xdgshellwindow-enforce-min-size.patch" ) # KDE-bug 469237
+
 src_prepare() {
 	ecm_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-5.26.80-gstreamer-optional.patch"


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2023-09-20 13:15 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2023-09-20 13:15 UTC (permalink / raw
  To: gentoo-commits

commit:     b517cf86803c3a30dc305b34cfaeecd344c1150a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 20 09:09:52 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 20 13:14:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b517cf86

kde-plasma/kwin: Add missing patch

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/kwin/files/kwin-5.27.8-cmake.patch | 40 +++++++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.27.8-r1.ebuild         |  2 ++
 2 files changed, 42 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.27.8-cmake.patch b/kde-plasma/kwin/files/kwin-5.27.8-cmake.patch
new file mode 100644
index 000000000000..4c4634140be9
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.8-cmake.patch
@@ -0,0 +1,40 @@
+From bd41dd93f37df79c7e14293c26dbff5abe5e4ce4 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Tue, 21 Mar 2023 20:31:44 +0200
+Subject: [PATCH] Drop unused kitemviews dependency
+
+Seems unused. KWin compiles fine without it.
+
+(cherry picked from commit 2c0acdca11dd25b0a3d5de8125c61d3523e83fbd)
+---
+ CMakeLists.txt                  | 1 -
+ src/kcms/scripts/CMakeLists.txt | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f98937161f..d49f8a9471 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -90,7 +90,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
+     NewStuff
+     Service
+     XmlGui
+-    ItemViews
+ )
+ 
+ find_package(Threads)
+diff --git a/src/kcms/scripts/CMakeLists.txt b/src/kcms/scripts/CMakeLists.txt
+index 66966d6d46..fd7a368a97 100644
+--- a/src/kcms/scripts/CMakeLists.txt
++++ b/src/kcms/scripts/CMakeLists.txt
+@@ -18,7 +18,6 @@ target_link_libraries(kcm_kwin_scripts
+     KF5::NewStuffWidgets
+     KF5::Package
+     KF5::QuickAddons
+-    KF5::ItemViews
+ )
+ 
+ kpackage_install_package(package kcm_kwin_scripts kcms)
+-- 
+2.42.0
+

diff --git a/kde-plasma/kwin/kwin-5.27.8-r1.ebuild b/kde-plasma/kwin/kwin-5.27.8-r1.ebuild
index 987500c11e15..9a17232d63c3 100644
--- a/kde-plasma/kwin/kwin-5.27.8-r1.ebuild
+++ b/kde-plasma/kwin/kwin-5.27.8-r1.ebuild
@@ -100,6 +100,8 @@ BDEPEND="
 "
 PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
 
+PATCHES=( "${FILESDIR}/${P}-cmake.patch" ) # bug 914143
+
 src_prepare() {
 	ecm_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-5.26.80-gstreamer-optional.patch"


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2023-06-27 11:25 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2023-06-27 11:25 UTC (permalink / raw
  To: gentoo-commits

commit:     0064478e953065c8b786ed6ef52dbe6132cfdb2a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 27 07:26:45 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jun 27 11:25:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0064478e

kde-plasma/kwin: Backport various 5.27.7 fixes

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=469625
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=471285
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=444665
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=471139

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kwin-5.27.6-fix-crash-after-login.patch  |  36 +++++
 .../kwin-5.27.6-fix-crash-click-on-tooltip.patch   |  34 +++++
 ....6-fix-effect-to-only-apply-behind-window.patch |  98 ++++++++++++++
 ...7.6-fix-locale1-use-after-free-xkb_keymap.patch |  57 ++++++++
 kde-plasma/kwin/kwin-5.27.6-r1.ebuild              | 145 +++++++++++++++++++++
 5 files changed, 370 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.27.6-fix-crash-after-login.patch b/kde-plasma/kwin/files/kwin-5.27.6-fix-crash-after-login.patch
new file mode 100644
index 000000000000..130bcca50cdf
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.6-fix-crash-after-login.patch
@@ -0,0 +1,36 @@
+From ed916ff21629f3e91ee987552d778b1a65d66702 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde@davidedmundson.co.uk>
+Date: Sat, 17 Jun 2023 13:01:43 +0100
+Subject: [PATCH] effects: Make OpenGL context current before deleting
+ framebuffer
+
+When we delete a window we unredirect, when we unredirect, we delete the
+framebuffer which requires an openGL context.
+
+handleWindowDeleted is the entry point from workspace events to effects
+code, so it's made current here.
+
+BUG: 444665
+BUG: 471139
+
+
+(cherry picked from commit c5a29b4b66c001c49c5bcf9aa9250d8322eefbbd)
+---
+ src/libkwineffects/kwinoffscreeneffect.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/libkwineffects/kwinoffscreeneffect.cpp b/src/libkwineffects/kwinoffscreeneffect.cpp
+index 82abea675c1..d1bd2921576 100644
+--- a/src/libkwineffects/kwinoffscreeneffect.cpp
++++ b/src/libkwineffects/kwinoffscreeneffect.cpp
+@@ -238,6 +238,7 @@ void OffscreenEffect::handleWindowDamaged(EffectWindow *window)
+ 
+ void OffscreenEffect::handleWindowDeleted(EffectWindow *window)
+ {
++    effects->makeOpenGLContextCurrent();
+     unredirect(window);
+ }
+ 
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.27.6-fix-crash-click-on-tooltip.patch b/kde-plasma/kwin/files/kwin-5.27.6-fix-crash-click-on-tooltip.patch
new file mode 100644
index 000000000000..b8384cd9abed
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.6-fix-crash-click-on-tooltip.patch
@@ -0,0 +1,34 @@
+From 21d193506851e0727860927ab289869732b06102 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Wed, 21 Jun 2023 12:39:15 +0200
+Subject: [PATCH] input: don't crash if the internal handle is nullptr
+
+Pointer focus can stay on a closed tooltip while focus updates are blocked,
+so this needs to be checked for
+
+BUG: 471285
+
+
+(cherry picked from commit c25aaa2c9fbf8ec10f1ba16fecd4b31704fdaf0c)
+---
+ src/input.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/input.cpp b/src/input.cpp
+index b4940f123ad..d3d32020580 100644
+--- a/src/input.cpp
++++ b/src/input.cpp
+@@ -1185,6 +1185,10 @@ class InternalWindowEventFilter : public InputEventFilter
+             return false;
+         }
+         QWindow *internal = static_cast<InternalWindow *>(input()->pointer()->focus())->handle();
++        if (!internal) {
++            // the handle can be nullptr if the tooltip gets closed while focus updates are blocked
++            return false;
++        }
+         QMouseEvent mouseEvent(event->type(),
+                                event->pos() - internal->position(),
+                                event->globalPos(),
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.27.6-fix-effect-to-only-apply-behind-window.patch b/kde-plasma/kwin/files/kwin-5.27.6-fix-effect-to-only-apply-behind-window.patch
new file mode 100644
index 000000000000..b2c8c026316b
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.6-fix-effect-to-only-apply-behind-window.patch
@@ -0,0 +1,98 @@
+From 69151896615ec272d78860b2ef42e61657f435f1 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Thu, 22 Jun 2023 11:35:27 +0200
+Subject: [PATCH] plugins/backgroundcontrast,blur: ensure the effect is only
+ applied behind the window
+
+When a window is translated and/or scaled, the effect must be strictly behind the
+window and never beyond it, as that is very noticeable.
+
+BUG: 469625
+(cherry picked from commit cd94cdaf3a04227073c3f99833139a712d195d3a)
+---
+ src/effects/backgroundcontrast/contrast.cpp | 22 +++++++++++++--------
+ src/effects/blur/blur.cpp                   | 19 ++++++++++++------
+ 2 files changed, 27 insertions(+), 14 deletions(-)
+
+diff --git a/src/effects/backgroundcontrast/contrast.cpp b/src/effects/backgroundcontrast/contrast.cpp
+index 8921a481e3f..66dffd99a94 100644
+--- a/src/effects/backgroundcontrast/contrast.cpp
++++ b/src/effects/backgroundcontrast/contrast.cpp
+@@ -382,25 +382,31 @@ void ContrastEffect::drawWindow(EffectWindow *w, int mask, const QRegion &region
+         const QRect screen = effects->renderTargetRect();
+         QRegion shape = region & contrastRegion(w).translated(w->pos().toPoint()) & screen;
+ 
+-        // let's do the evil parts - someone wants to blur behind a transformed window
++        // let's do the evil parts - someone wants to contrast behind a transformed window
+         const bool translated = data.xTranslation() || data.yTranslation();
+         const bool scaled = data.xScale() != 1 || data.yScale() != 1;
+         if (scaled) {
+             QPoint pt = shape.boundingRect().topLeft();
+             QRegion scaledShape;
+             for (QRect r : shape) {
+-                r.moveTo(pt.x() + (r.x() - pt.x()) * data.xScale() + data.xTranslation(),
+-                         pt.y() + (r.y() - pt.y()) * data.yScale() + data.yTranslation());
+-                r.setWidth(std::ceil(r.width() * data.xScale()));
+-                r.setHeight(std::ceil(r.height() * data.yScale()));
+-                scaledShape |= r;
++                const QPointF topLeft(pt.x() + (r.x() - pt.x()) * data.xScale() + data.xTranslation(),
++                                      pt.y() + (r.y() - pt.y()) * data.yScale() + data.yTranslation());
++                const QPoint bottomRight(std::floor(topLeft.x() + r.width() * data.xScale()) - 1,
++                                         std::floor(topLeft.y() + r.height() * data.yScale()) - 1);
++                scaledShape |= QRect(QPoint(std::floor(topLeft.x()), std::floor(topLeft.y())), bottomRight);
+             }
+             shape = scaledShape & region;
+ 
+             // Only translated, not scaled
+         } else if (translated) {
+-            shape = shape.translated(data.xTranslation(), data.yTranslation());
+-            shape = shape & region;
++            QRegion translated;
++            for (QRect r : shape) {
++                const QRectF t = QRectF(r).translated(data.xTranslation(), data.yTranslation());
++                const QPoint topLeft(std::ceil(t.x()), std::ceil(t.y()));
++                const QPoint bottomRight(std::floor(t.x() + t.width() - 1), std::floor(t.y() + t.height() - 1));
++                translated |= QRect(topLeft, bottomRight);
++            }
++            shape = translated & region;
+         }
+ 
+         if (!shape.isEmpty()) {
+diff --git a/src/effects/blur/blur.cpp b/src/effects/blur/blur.cpp
+index ec08e6cc968..1b6d9997c98 100644
+--- a/src/effects/blur/blur.cpp
++++ b/src/effects/blur/blur.cpp
+@@ -625,17 +625,24 @@ void BlurEffect::drawWindow(EffectWindow *w, int mask, const QRegion &region, Wi
+             QPoint pt = shape.boundingRect().topLeft();
+             QRegion scaledShape;
+             for (QRect r : shape) {
+-                r.moveTo(pt.x() + (r.x() - pt.x()) * data.xScale() + data.xTranslation(),
+-                         pt.y() + (r.y() - pt.y()) * data.yScale() + data.yTranslation());
+-                r.setWidth(std::ceil(r.width() * data.xScale()));
+-                r.setHeight(std::ceil(r.height() * data.yScale()));
+-                scaledShape |= r;
++                const QPointF topLeft(pt.x() + (r.x() - pt.x()) * data.xScale() + data.xTranslation(),
++                                      pt.y() + (r.y() - pt.y()) * data.yScale() + data.yTranslation());
++                const QPoint bottomRight(std::floor(topLeft.x() + r.width() * data.xScale()) - 1,
++                                         std::floor(topLeft.y() + r.height() * data.yScale()) - 1);
++                scaledShape |= QRect(QPoint(std::floor(topLeft.x()), std::floor(topLeft.y())), bottomRight);
+             }
+             shape = scaledShape;
+ 
+             // Only translated, not scaled
+         } else if (translated) {
+-            shape = shape.translated(data.xTranslation(), data.yTranslation());
++            QRegion translated;
++            for (QRect r : shape) {
++                const QRectF t = QRectF(r).translated(data.xTranslation(), data.yTranslation());
++                const QPoint topLeft(std::ceil(t.x()), std::ceil(t.y()));
++                const QPoint bottomRight(std::floor(t.x() + t.width() - 1), std::floor(t.y() + t.height() - 1));
++                translated |= QRect(topLeft, bottomRight);
++            }
++            shape = translated;
+         }
+ 
+         EffectWindow *modal = w->transientFor();
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.27.6-fix-locale1-use-after-free-xkb_keymap.patch b/kde-plasma/kwin/files/kwin-5.27.6-fix-locale1-use-after-free-xkb_keymap.patch
new file mode 100644
index 000000000000..6fcd3af4cfda
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.6-fix-locale1-use-after-free-xkb_keymap.patch
@@ -0,0 +1,57 @@
+From 2d09d7961b09693aa56a99eb3ba9680e84192936 Mon Sep 17 00:00:00 2001
+From: Aleksei Bavshin <alebastr89@gmail.com>
+Date: Fri, 23 Jun 2023 03:14:09 -0700
+Subject: [PATCH] locale1: fix use-after-free in xkb_keymap creation
+
+qPrintable creates temporary objects that are destroyed before
+`xkb_keymap_new_from_names` is called. It's highly likely that the data
+we pass to xkbcommon will be overwritten by random data by that point.
+
+Fix that by storing values as QByteArrays just like
+`Xkb::loadKeymapFromConfig` does.
+
+
+(cherry picked from commit f70bda9f6de2d38ae3859afb3f96cad1e9c47590)
+---
+ src/xkb.cpp | 22 +++++++++++++++-------
+ 1 file changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/src/xkb.cpp b/src/xkb.cpp
+index 4a5f72d940a..b3bb5e77252 100644
+--- a/src/xkb.cpp
++++ b/src/xkb.cpp
+@@ -250,16 +250,24 @@ xkb_keymap *Xkb::loadKeymapFromLocale1()
+ {
+     OrgFreedesktopDBusPropertiesInterface locale1Properties(s_locale1Interface, "/org/freedesktop/locale1", QDBusConnection::systemBus(), this);
+     const QVariantMap properties = locale1Properties.GetAll(s_locale1Interface);
+-    const QString layouts = properties["X11Layout"].toString();
++
++    const QByteArray model = properties["X11Model"].toByteArray();
++    const QByteArray layout = properties["X11Layout"].toByteArray();
++    const QByteArray variant = properties["X11Variant"].toByteArray();
++    const QByteArray options = properties["X11Options"].toByteArray();
++
+     xkb_rule_names ruleNames = {
+-        nullptr,
+-        qPrintable(properties["X11Model"].toString()),
+-        qPrintable(layouts),
+-        qPrintable(properties["X11Variant"].toString()),
+-        qPrintable(properties["X11Options"].toString()),
++        .rules = nullptr,
++        .model = model.constData(),
++        .layout = layout.constData(),
++        .variant = variant.constData(),
++        .options = options.constData(),
+     };
++
+     applyEnvironmentRules(ruleNames);
+-    m_layoutList = layouts.split(QLatin1Char(','));
++
++    m_layoutList = QString::fromLatin1(ruleNames.layout).split(QLatin1Char(','));
++
+     return xkb_keymap_new_from_names(m_context, &ruleNames, XKB_KEYMAP_COMPILE_NO_FLAGS);
+ }
+ 
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.27.6-r1.ebuild b/kde-plasma/kwin/kwin-5.27.6-r1.ebuild
new file mode 100644
index 000000000000..3ccb2eace546
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.27.6-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.106.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.9
+inherit ecm plasma.kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only lock multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.19
+	>=dev-libs/wayland-1.21.0
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[egl,gles2-only=,libinput]
+	>=dev-qt/qtwayland-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5[qml]
+	>=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=[X]
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/kitemviews-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	media-libs/libglvnd
+	>=media-libs/mesa-21.3[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	>=x11-libs/libdrm-2.4.112
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxcvt-0.1.1
+	>=x11-libs/libxkbcommon-1.5.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	lock? ( >=kde-plasma/kscreenlocker-${PVCUT}:5 )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-plasma/kwayland-server
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/plasma-wayland-protocols-1.9
+	>=dev-libs/wayland-protocols-1.31
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+"
+BDEPEND="
+	>=dev-qt/qtwaylandscanner-${QTMIN}:5
+	dev-util/wayland-scanner
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=(
+	"${FILESDIR}/${P}-fix-crash-click-on-tooltip.patch" # KDE-bug 471285
+	"${FILESDIR}/${P}-fix-crash-after-login.patch" # KDE-bugs 444665, 471139
+	"${FILESDIR}/${P}-fix-effect-to-only-apply-behind-window.patch"
+	"${FILESDIR}/${P}-fix-locale1-use-after-free-xkb_keymap.patch" # KDE-bug 469625
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.26.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		# KWIN_BUILD_NOTIFICATIONS exists, but kdeclarative still hard-depends on it
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		-DKWIN_BUILD_SCREENLOCKER=$(usex lock)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2023-05-10 11:37 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2023-05-10 11:37 UTC (permalink / raw
  To: gentoo-commits

commit:     fe3af7c0cfd84c05208d9d18ec89e8c84b6e1da3
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed May 10 11:27:43 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed May 10 11:37:04 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe3af7c0

kde-plasma/kwin: Fix xcbutils nativeFloor

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=459373

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin-5.27.5-fix-xcbutils-nativeFloor.patch     |  32 +++++
 kde-plasma/kwin/kwin-5.27.5-r1.ebuild              | 141 +++++++++++++++++++++
 2 files changed, 173 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.27.5-fix-xcbutils-nativeFloor.patch b/kde-plasma/kwin/files/kwin-5.27.5-fix-xcbutils-nativeFloor.patch
new file mode 100644
index 000000000000..97fed89af956
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.27.5-fix-xcbutils-nativeFloor.patch
@@ -0,0 +1,32 @@
+From 2237391e979b2423462bb5eaf1fdf4c0876f7476 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Wed, 10 May 2023 12:28:24 +0200
+Subject: [PATCH] xcbutils: fix nativeFloor
+
+The floor was not done in the X-native coordinate space but with double
+scaling
+
+BUG: 459373
+
+
+(cherry picked from commit a48c98f5aba71fab8bc1e1d5dd18668833631920)
+---
+ src/utils/xcbutils.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/utils/xcbutils.cpp b/src/utils/xcbutils.cpp
+index cea0ef7c894..9731f483c0b 100644
+--- a/src/utils/xcbutils.cpp
++++ b/src/utils/xcbutils.cpp
+@@ -646,7 +646,7 @@ QSizeF fromXNative(const QSize &s)
+ 
+ static qreal nativeFloor(qreal value)
+ {
+-    return std::floor(value / kwinApp()->xwaylandScale()) * kwinApp()->xwaylandScale();
++    return std::floor(value * kwinApp()->xwaylandScale()) / kwinApp()->xwaylandScale();
+ }
+ 
+ QRectF nativeFloor(const QRectF &rect)
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.27.5-r1.ebuild b/kde-plasma/kwin/kwin-5.27.5-r1.ebuild
new file mode 100644
index 000000000000..1cb246c16ea3
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.27.5-r1.ebuild
@@ -0,0 +1,141 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.102.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.7
+VIRTUALX_REQUIRED="test"
+inherit ecm plasma.kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only lock multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.19
+	>=dev-libs/wayland-1.21.0
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[egl,gles2-only=,libinput]
+	>=dev-qt/qtwayland-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5[qml]
+	>=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=[X]
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/kitemviews-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	media-libs/libglvnd
+	>=media-libs/mesa-21.3[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	>=x11-libs/libdrm-2.4.112
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxcvt-0.1.1
+	>=x11-libs/libxkbcommon-1.5.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	lock? ( >=kde-plasma/kscreenlocker-${PVCUT}:5 )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-plasma/kwayland-server
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/plasma-wayland-protocols-1.9
+	>=dev-libs/wayland-protocols-1.31
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+"
+BDEPEND="
+	>=dev-qt/qtwaylandscanner-${QTMIN}:5
+	dev-util/wayland-scanner
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=( "${FILESDIR}/${P}-fix-xcbutils-nativeFloor.patch" )
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.26.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		# KWIN_BUILD_NOTIFICATIONS exists, but kdeclarative still hard-depends on it
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		-DKWIN_BUILD_SCREENLOCKER=$(usex lock)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2022-10-28 16:07 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2022-10-28 16:07 UTC (permalink / raw
  To: gentoo-commits

commit:     8834995e038f4e3c40091ad86bf61e65befb3cb4
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 28 16:05:58 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Oct 28 16:07:03 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8834995e

kde-plasma/kwin: Backport several 5.26.3 fixes

KDE-bugs:
https://bugs.kde.org/show_bug.cgi?id=461032
https://bugs.kde.org/show_bug.cgi?id=450000
https://bugs.kde.org/show_bug.cgi?id=460980

Plus upstream commit 2465dfe8ce94e1afeed3e3210adef9019e76383b

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...nager-emit-timing-chang-only-when-changed.patch | 147 +++++++++++++++++++++
 ...kwin-5.26.2.1-x11-dont-force-QT_NO_GLIB-1.patch |  34 +++++
 ...26.2.1-x11-dont-force-QT_QPA_PLATFORM-xcb.patch |  30 +++++
 ...in-5.26.2.1-x11window-fix-maximise-freeze.patch |  35 +++++
 kde-plasma/kwin/kwin-5.26.2.1-r1.ebuild            | 146 ++++++++++++++++++++
 5 files changed, 392 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.26.2.1-nightcolormanager-emit-timing-chang-only-when-changed.patch b/kde-plasma/kwin/files/kwin-5.26.2.1-nightcolormanager-emit-timing-chang-only-when-changed.patch
new file mode 100644
index 000000000000..4378d850c6ba
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.26.2.1-nightcolormanager-emit-timing-chang-only-when-changed.patch
@@ -0,0 +1,147 @@
+From 2465dfe8ce94e1afeed3e3210adef9019e76383b Mon Sep 17 00:00:00 2001
+From: Kai Uwe Broulik <kai_uwe.broulik@mbition.io>
+Date: Fri, 28 Oct 2022 10:28:32 +0200
+Subject: [PATCH] nightcolormanager: Emit timing change only when they have
+ actually changed
+
+Avoids pointless DBus traffic.
+
+Signed-off-by: Victoria Fischer <victoria.fischer@mbition.io>
+
+
+(cherry picked from commit 0902d91a4254c4b3076e07b8479bb516884b21e4)
+---
+ src/plugins/nightcolor/nightcolormanager.cpp | 93 ++++++++++----------
+ 1 file changed, 47 insertions(+), 46 deletions(-)
+
+diff --git a/src/plugins/nightcolor/nightcolormanager.cpp b/src/plugins/nightcolor/nightcolormanager.cpp
+index ffa8ee8291..725623ed87 100644
+--- a/src/plugins/nightcolor/nightcolormanager.cpp
++++ b/src/plugins/nightcolor/nightcolormanager.cpp
+@@ -518,17 +518,15 @@ void NightColorManager::updateTargetTemperature()
+ 
+ void NightColorManager::updateTransitionTimings(bool force)
+ {
++    const auto oldPrev = m_prev;
++    const auto oldNext = m_next;
++
+     if (m_mode == NightColorMode::Constant) {
+         m_next = DateTimes();
+         m_prev = DateTimes();
+-        Q_EMIT previousTransitionTimingsChanged();
+-        Q_EMIT scheduledTransitionTimingsChanged();
+-        return;
+-    }
+-
+-    const QDateTime todayNow = QDateTime::currentDateTime();
++    } else if (m_mode == NightColorMode::Timings) {
++        const QDateTime todayNow = QDateTime::currentDateTime();
+ 
+-    if (m_mode == NightColorMode::Timings) {
+         const QDateTime nextMorB = QDateTime(todayNow.date().addDays(m_morning < todayNow.time()), m_morning);
+         const QDateTime nextMorE = nextMorB.addSecs(m_trTime * 60);
+         const QDateTime nextEveB = QDateTime(todayNow.date().addDays(m_evening < todayNow.time()), m_evening);
+@@ -543,58 +541,61 @@ void NightColorManager::updateTransitionTimings(bool force)
+             m_next = DateTimes(nextMorB, nextMorE);
+             m_prev = DateTimes(nextEveB.addDays(-1), nextEveE.addDays(-1));
+         }
+-        Q_EMIT previousTransitionTimingsChanged();
+-        Q_EMIT scheduledTransitionTimingsChanged();
+-        return;
+-    }
+-
+-    double lat, lng;
+-    if (m_mode == NightColorMode::Automatic) {
+-        lat = m_latAuto;
+-        lng = m_lngAuto;
+     } else {
+-        lat = m_latFixed;
+-        lng = m_lngFixed;
+-    }
++        const QDateTime todayNow = QDateTime::currentDateTime();
+ 
+-    if (!force) {
+-        // first try by only switching the timings
+-        if (m_prev.first.date() == m_next.first.date()) {
+-            // next is evening
+-            m_daylight = true;
+-            m_prev = m_next;
+-            m_next = getSunTimings(todayNow, lat, lng, false);
++        double lat, lng;
++        if (m_mode == NightColorMode::Automatic) {
++            lat = m_latAuto;
++            lng = m_lngAuto;
+         } else {
+-            // next is morning
+-            m_daylight = false;
+-            m_prev = m_next;
+-            m_next = getSunTimings(todayNow.addDays(1), lat, lng, true);
++            lat = m_latFixed;
++            lng = m_lngFixed;
+         }
+-    }
+ 
+-    if (force || !checkAutomaticSunTimings()) {
+-        // in case this fails, reset them
+-        DateTimes morning = getSunTimings(todayNow, lat, lng, true);
+-        if (todayNow < morning.first) {
+-            m_daylight = false;
+-            m_prev = getSunTimings(todayNow.addDays(-1), lat, lng, false);
+-            m_next = morning;
+-        } else {
+-            DateTimes evening = getSunTimings(todayNow, lat, lng, false);
+-            if (todayNow < evening.first) {
++        if (!force) {
++            // first try by only switching the timings
++            if (m_prev.first.date() == m_next.first.date()) {
++                // next is evening
+                 m_daylight = true;
+-                m_prev = morning;
+-                m_next = evening;
++                m_prev = m_next;
++                m_next = getSunTimings(todayNow, lat, lng, false);
+             } else {
++                // next is morning
+                 m_daylight = false;
+-                m_prev = evening;
++                m_prev = m_next;
+                 m_next = getSunTimings(todayNow.addDays(1), lat, lng, true);
+             }
+         }
++
++        if (force || !checkAutomaticSunTimings()) {
++            // in case this fails, reset them
++            DateTimes morning = getSunTimings(todayNow, lat, lng, true);
++            if (todayNow < morning.first) {
++                m_daylight = false;
++                m_prev = getSunTimings(todayNow.addDays(-1), lat, lng, false);
++                m_next = morning;
++            } else {
++                DateTimes evening = getSunTimings(todayNow, lat, lng, false);
++                if (todayNow < evening.first) {
++                    m_daylight = true;
++                    m_prev = morning;
++                    m_next = evening;
++                } else {
++                    m_daylight = false;
++                    m_prev = evening;
++                    m_next = getSunTimings(todayNow.addDays(1), lat, lng, true);
++                }
++            }
++        }
+     }
+ 
+-    Q_EMIT previousTransitionTimingsChanged();
+-    Q_EMIT scheduledTransitionTimingsChanged();
++    if (oldPrev != m_prev) {
++        Q_EMIT previousTransitionTimingsChanged();
++    }
++    if (oldNext != m_next) {
++        Q_EMIT scheduledTransitionTimingsChanged();
++    }
+ }
+ 
+ DateTimes NightColorManager::getSunTimings(const QDateTime &dateTime, double latitude, double longitude, bool morning) const
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.26.2.1-x11-dont-force-QT_NO_GLIB-1.patch b/kde-plasma/kwin/files/kwin-5.26.2.1-x11-dont-force-QT_NO_GLIB-1.patch
new file mode 100644
index 000000000000..9de1f3db128f
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.26.2.1-x11-dont-force-QT_NO_GLIB-1.patch
@@ -0,0 +1,34 @@
+From 4c5830ba149ec4462587a95f78624dfc981d281c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Patron?= <priv.luk@gmail.com>
+Date: Tue, 25 Oct 2022 15:49:27 +0200
+Subject: [PATCH] x11: Don't force QT_NO_GLIB=1
+
+This breaks certain apps, e.g. KDE System Settings when launched from
+overview effect.
+
+BUG: 460980
+
+
+(cherry picked from commit c2b4f03f9671c0ad9fc1929426df5f79db414aa7)
+---
+ src/main_x11.cpp | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/main_x11.cpp b/src/main_x11.cpp
+index 21cfab94b3..c175d8729e 100644
+--- a/src/main_x11.cpp
++++ b/src/main_x11.cpp
+@@ -337,10 +337,6 @@ int main(int argc, char *argv[])
+ 
+     signal(SIGPIPE, SIG_IGN);
+ 
+-    // Disable the glib event loop integration, since it seems to be responsible
+-    // for several bug reports about high CPU usage (bug #239963)
+-    setenv("QT_NO_GLIB", "1", true);
+-
+     // enforce xcb plugin, unfortunately command line switch has precedence
+     setenv("QT_QPA_PLATFORM", "xcb", true);
+ 
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.26.2.1-x11-dont-force-QT_QPA_PLATFORM-xcb.patch b/kde-plasma/kwin/files/kwin-5.26.2.1-x11-dont-force-QT_QPA_PLATFORM-xcb.patch
new file mode 100644
index 000000000000..e5e222436060
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.26.2.1-x11-dont-force-QT_QPA_PLATFORM-xcb.patch
@@ -0,0 +1,30 @@
+From 8633f9952507c3e99175a43b4d813cc1669f8db9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C5=81ukasz=20Patron?= <priv.luk@gmail.com>
+Date: Thu, 27 Oct 2022 00:42:24 +0200
+Subject: [PATCH] x11: Don't force QT_QPA_PLATFORM=xcb
+
+This is basically a cherry pick of 77ec43d5e (Don't force
+QT_QPA_PLATFORM=wayland), except for X11.
+
+
+(cherry picked from commit a9acef8573ca44ce9649a6ced42e19ef6d4ee3fd)
+---
+ src/main_x11.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/main_x11.cpp b/src/main_x11.cpp
+index 086ba79dba..21cfab94b3 100644
+--- a/src/main_x11.cpp
++++ b/src/main_x11.cpp
+@@ -361,6 +361,8 @@ int main(int argc, char *argv[])
+ 
+     KWin::ApplicationX11 a(argc, argv);
+     a.setupTranslator();
++    // reset QT_QPA_PLATFORM so we don't propagate it to our children (e.g. apps launched from the overview effect)
++    qunsetenv("QT_QPA_PLATFORM");
+ 
+     KSignalHandler::self()->watchSignal(SIGTERM);
+     KSignalHandler::self()->watchSignal(SIGINT);
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.26.2.1-x11window-fix-maximise-freeze.patch b/kde-plasma/kwin/files/kwin-5.26.2.1-x11window-fix-maximise-freeze.patch
new file mode 100644
index 000000000000..8a4de9426ca6
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.26.2.1-x11window-fix-maximise-freeze.patch
@@ -0,0 +1,35 @@
+From 2339f7bfb7872e05fbdbd931850a74a3441b3292 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Wed, 26 Oct 2022 21:43:41 +0200
+Subject: [PATCH] x11window: revert more from 3a28c02f
+
+BUG: 461032
+
+
+(cherry picked from commit 2997fb24bb8171145ce1107df85eb3a3a4c0cf74)
+---
+ src/x11window.cpp | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/src/x11window.cpp b/src/x11window.cpp
+index c02d33b338..b7a180d317 100644
+--- a/src/x11window.cpp
++++ b/src/x11window.cpp
+@@ -4519,11 +4519,10 @@ void X11Window::changeMaximize(bool horizontal, bool vertical, bool adjust)
+                 }
+             }
+             r.moveTopLeft(rules()->checkPosition(r.topLeft()));
+-            // The above code tries to center align the window followed by setting top and bottom
+-            // it's possible that we're in between two pixels
+-            r.setX(Xcb::nativeFloor(r.x()));
+-            r.setY(Xcb::nativeFloor(r.y()));
+         }
++        // The above code tries to center align the window followed by setting top and bottom
++        // it's possible that we're in between two pixels
++        r = Xcb::nativeFloor(r);
+ 
+         moveResize(r);
+         if (options->electricBorderMaximize() && r.top() == clientArea.top()) {
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.26.2.1-r1.ebuild b/kde-plasma/kwin/kwin-5.26.2.1-r1.ebuild
new file mode 100644
index 000000000000..5456ecfa6511
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.26.2.1-r1.ebuild
@@ -0,0 +1,146 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.99.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.5
+VIRTUALX_REQUIRED="test"
+inherit ecm plasma.kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64"
+IUSE="accessibility caps gles2-only lock multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.19
+	>=dev-libs/wayland-1.20.0
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[egl,gles2-only=,libinput]
+	>=dev-qt/qtwayland-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5[qml]
+	>=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=[X]
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/kitemviews-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	media-libs/libglvnd
+	>=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	>=x11-libs/libdrm-2.4.108
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxcvt-0.1.1
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	lock? ( >=kde-plasma/kscreenlocker-${PVCUT}:5 )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	!kde-plasma/kwayland-server
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-libs/plasma-wayland-protocols-1.9
+	>=dev-libs/wayland-protocols-1.25
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+"
+BDEPEND="
+	>=dev-qt/qtwaylandscanner-${QTMIN}:5
+	dev-util/wayland-scanner
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=(
+	"${FILESDIR}/${P}-x11window-fix-maximise-freeze.patch" # KDE-bug 461032
+	"${FILESDIR}/${P}-x11-dont-force-QT_NO_GLIB-1.patch" # KDE-bug 450000
+	"${FILESDIR}/${P}-x11-dont-force-QT_QPA_PLATFORM-xcb.patch" # KDE-bug 460980
+	"${FILESDIR}/${P}-nightcolormanager-emit-timing-chang-only-when-changed.patch"
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		# KWIN_BUILD_NOTIFICATIONS exists, but kdeclarative still hard-depends on it
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		-DKWIN_BUILD_SCREENLOCKER=$(usex lock)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2022-05-25 21:13 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2022-05-25 21:13 UTC (permalink / raw
  To: gentoo-commits

commit:     854fdba3048965bfa65fdb9d0d827c3cf86283e7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed May 25 19:30:12 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed May 25 21:10:11 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=854fdba3

kde-plasma/kwin: Backport several 5.24.6 fixes

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin-5.24.5-fix-plasmashell-crash-1.patch      | 307 +++++++++++++++++++++
 .../kwin-5.24.5-fix-plasmashell-crash-2.patch      |  35 +++
 .../kwin-5.24.5-update-device-outputName.patch     |  32 +++
 kde-plasma/kwin/kwin-5.24.5-r2.ebuild              | 142 ++++++++++
 4 files changed, 516 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-fix-plasmashell-crash-1.patch b/kde-plasma/kwin/files/kwin-5.24.5-fix-plasmashell-crash-1.patch
new file mode 100644
index 000000000000..46b6f0ad9c71
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-fix-plasmashell-crash-1.patch
@@ -0,0 +1,307 @@
+From 4c3195270d6c8e1da8c3e2e3abe5aae75d5bf3c2 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Fri, 26 Nov 2021 12:03:14 +0200
+Subject: [PATCH] Ensure that Toplevel::output() stays always in sync with
+ geometry
+
+Currently, if geometry updates are blocked, the Toplevel.output property
+won't be updated. On the other hand, it's reasonable to use the output
+property instead of manually looking up the output in window management
+code, e.g. Workspace::clientArea().
+
+In other words, using the Toplevel.output property is like walking on a
+mine field, things can blow up. You can't use Toplevel.output even if it
+makes perfect sense.
+
+This change ensures that Toplevel.output property is always kept in sync
+with the frame geometry. Unfortunately, this means that the output
+property no longer can be updated when the frameGeometryChanged() signal
+is emitted. It has to be done in moveResizeInternal() method.
+
+BUG: 448064
+
+(cherry picked from 510a41eeb89f51843405fa0258c852ab06d05bb8)
+
+Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2448>
+---
+ src/abstract_client.cpp |  3 ---
+ src/events.cpp          |  1 +
+ src/internal_client.cpp |  6 ++++++
+ src/toplevel.cpp        | 17 -----------------
+ src/toplevel.h          | 10 ++--------
+ src/unmanaged.cpp       |  6 ++++++
+ src/unmanaged.h         |  1 +
+ src/waylandclient.cpp   |  6 ++++++
+ src/x11client.cpp       |  7 +++++++
+ src/x11client.h         |  1 +
+ 10 files changed, 30 insertions(+), 28 deletions(-)
+
+diff --git a/src/abstract_client.cpp b/src/abstract_client.cpp
+index 0714b9ac3f..ddff11e53c 100644
+--- a/src/abstract_client.cpp
++++ b/src/abstract_client.cpp
+@@ -63,8 +63,6 @@ AbstractClient::AbstractClient()
+ {
+     connect(this, &AbstractClient::clientStartUserMovedResized,  this, &AbstractClient::moveResizedChanged);
+     connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::moveResizedChanged);
+-    connect(this, &AbstractClient::clientStartUserMovedResized,  this, &AbstractClient::removeCheckOutputConnection);
+-    connect(this, &AbstractClient::clientFinishUserMovedResized, this, &AbstractClient::setupCheckOutputConnection);
+ 
+     connect(this, &AbstractClient::windowShown, this, &AbstractClient::hiddenChanged);
+     connect(this, &AbstractClient::windowHidden, this, &AbstractClient::hiddenChanged);
+@@ -1011,7 +1009,6 @@ void AbstractClient::finishInteractiveMoveResize(bool cancel)
+     if (cancel) {
+         moveResize(initialInteractiveMoveResizeGeometry());
+     }
+-    checkOutput(); // needs to be done because clientFinishUserMovedResized has not yet re-activated online alignment
+     if (output() != interactiveMoveResizeStartOutput()) {
+         workspace()->sendClientToOutput(this, output()); // checks rule validity
+         if (isFullScreen() || maximizeMode() != MaximizeRestore) {
+diff --git a/src/events.cpp b/src/events.cpp
+index b9bb9bbd36..a22960f0d0 100644
+--- a/src/events.cpp
++++ b/src/events.cpp
+@@ -1261,6 +1261,7 @@ void Unmanaged::configureNotifyEvent(xcb_configure_notify_event_t *e)
+         m_clientGeometry = newgeom;
+         m_frameGeometry = newgeom;
+         m_bufferGeometry = newgeom;
++        checkOutput();
+         Q_EMIT bufferGeometryChanged(this, old);
+         Q_EMIT clientGeometryChanged(this, old);
+         Q_EMIT frameGeometryChanged(this, old);
+diff --git a/src/internal_client.cpp b/src/internal_client.cpp
+index 3be51ff27b..b4c9250fd3 100644
+--- a/src/internal_client.cpp
++++ b/src/internal_client.cpp
+@@ -10,6 +10,7 @@
+ #include "internal_client.h"
+ #include "decorations/decorationbridge.h"
+ #include "deleted.h"
++#include "platform.h"
+ #include "surfaceitem.h"
+ #include "workspace.h"
+ 
+@@ -477,6 +478,7 @@ void InternalClient::commitGeometry(const QRect &rect)
+     // The client geometry and the buffer geometry are the same.
+     const QRect oldClientGeometry = m_clientGeometry;
+     const QRect oldFrameGeometry = m_frameGeometry;
++    const AbstractOutput *oldOutput = m_output;
+ 
+     m_clientGeometry = frameRectToClientRect(rect);
+     m_frameGeometry = rect;
+@@ -486,6 +488,7 @@ void InternalClient::commitGeometry(const QRect &rect)
+         return;
+     }
+ 
++    m_output = kwinApp()->platform()->outputAt(rect.center());
+     syncGeometryToInternalWindow();
+ 
+     if (oldClientGeometry != m_clientGeometry) {
+@@ -495,6 +498,9 @@ void InternalClient::commitGeometry(const QRect &rect)
+     if (oldFrameGeometry != m_frameGeometry) {
+         Q_EMIT frameGeometryChanged(this, oldFrameGeometry);
+     }
++    if (oldOutput != m_output) {
++        Q_EMIT screenChanged();
++    }
+     Q_EMIT geometryShapeChanged(this, oldFrameGeometry);
+ }
+ 
+diff --git a/src/toplevel.cpp b/src/toplevel.cpp
+index 698f6998e5..ff216835c4 100644
+--- a/src/toplevel.cpp
++++ b/src/toplevel.cpp
+@@ -47,7 +47,6 @@ Toplevel::Toplevel()
+     , m_skipCloseAnimation(false)
+ {
+     connect(screens(), &Screens::changed, this, &Toplevel::screenChanged);
+-    setupCheckOutputConnection();
+     connect(this, &Toplevel::bufferGeometryChanged, this, &Toplevel::inputTransformationChanged);
+ 
+     // Only for compatibility reasons, drop in the next major release.
+@@ -379,22 +378,6 @@ void Toplevel::deleteEffectWindow()
+     effect_window = nullptr;
+ }
+ 
+-void Toplevel::checkOutput()
+-{
+-    setOutput(kwinApp()->platform()->outputAt(frameGeometry().center()));
+-}
+-
+-void Toplevel::setupCheckOutputConnection()
+-{
+-    connect(this, &Toplevel::frameGeometryChanged, this, &Toplevel::checkOutput);
+-    checkOutput();
+-}
+-
+-void Toplevel::removeCheckOutputConnection()
+-{
+-    disconnect(this, &Toplevel::frameGeometryChanged, this, &Toplevel::checkOutput);
+-}
+-
+ int Toplevel::screen() const
+ {
+     return kwinApp()->platform()->enabledOutputs().indexOf(m_output);
+diff --git a/src/toplevel.h b/src/toplevel.h
+index f6b5dd4e61..3309647eb4 100644
+--- a/src/toplevel.h
++++ b/src/toplevel.h
+@@ -636,13 +636,6 @@ Q_SIGNALS:
+     void visibleGeometryChanged();
+ 
+ protected Q_SLOTS:
+-    /**
+-     * Checks whether the screen number for this Toplevel changed and updates if needed.
+-     * Any method changing the geometry of the Toplevel should call this method.
+-     */
+-    void checkOutput();
+-    void setupCheckOutputConnection();
+-    void removeCheckOutputConnection();
+     void setReadyForPainting();
+ 
+ protected:
+@@ -673,6 +666,8 @@ protected:
+     void deleteShadow();
+     void deleteEffectWindow();
+     void setDepth(int depth);
++
++    AbstractOutput *m_output = nullptr;
+     QRect m_frameGeometry;
+     QRect m_clientGeometry;
+     QRect m_bufferGeometry;
+@@ -700,7 +695,6 @@ private:
+     QRegion opaque_region;
+     mutable QRegion m_shapeRegion;
+     mutable bool m_shapeRegionIsValid = false;
+-    AbstractOutput *m_output = nullptr;
+     bool m_skipCloseAnimation;
+     quint32 m_pendingSurfaceId = 0;
+     QPointer<KWaylandServer::SurfaceInterface> m_surface;
+diff --git a/src/unmanaged.cpp b/src/unmanaged.cpp
+index de3caa303d..3164813a75 100644
+--- a/src/unmanaged.cpp
++++ b/src/unmanaged.cpp
+@@ -12,6 +12,7 @@
+ #include "workspace.h"
+ #include "effects.h"
+ #include "deleted.h"
++#include "platform.h"
+ #include "surfaceitem_x11.h"
+ #include "utils/common.h"
+ 
+@@ -206,6 +207,11 @@ QWindow *Unmanaged::findInternalWindow() const
+     return nullptr;
+ }
+ 
++void Unmanaged::checkOutput()
++{
++    setOutput(kwinApp()->platform()->outputAt(frameGeometry().center()));
++}
++
+ void Unmanaged::damageNotifyEvent()
+ {
+     Q_ASSERT(kwinApp()->operationMode() == Application::OperationModeX11);
+diff --git a/src/unmanaged.h b/src/unmanaged.h
+index e874fc1724..fa543eb0b8 100644
+--- a/src/unmanaged.h
++++ b/src/unmanaged.h
+@@ -45,6 +45,7 @@ private:
+     void configureNotifyEvent(xcb_configure_notify_event_t *e);
+     void damageNotifyEvent();
+     QWindow *findInternalWindow() const;
++    void checkOutput();
+     void associate();
+     void initialize();
+     bool m_outline = false;
+diff --git a/src/waylandclient.cpp b/src/waylandclient.cpp
+index 39d6ea22bc..9d8070c7f8 100644
+--- a/src/waylandclient.cpp
++++ b/src/waylandclient.cpp
+@@ -7,6 +7,7 @@
+ */
+ 
+ #include "waylandclient.h"
++#include "platform.h"
+ #include "screens.h"
+ #include "wayland_server.h"
+ #include "workspace.h"
+@@ -289,6 +290,7 @@ void WaylandClient::updateGeometry(const QRect &rect)
+     const QRect oldClientGeometry = m_clientGeometry;
+     const QRect oldFrameGeometry = m_frameGeometry;
+     const QRect oldBufferGeometry = m_bufferGeometry;
++    const AbstractOutput *oldOutput = m_output;
+ 
+     m_clientGeometry = frameRectToClientRect(rect);
+     m_frameGeometry = rect;
+@@ -310,6 +312,7 @@ void WaylandClient::updateGeometry(const QRect &rect)
+         return;
+     }
+ 
++    m_output = kwinApp()->platform()->outputAt(rect.center());
+     updateWindowRules(Rules::Position | Rules::Size);
+ 
+     if (changedGeometries & WaylandGeometryBuffer) {
+@@ -321,6 +324,9 @@ void WaylandClient::updateGeometry(const QRect &rect)
+     if (changedGeometries & WaylandGeometryFrame) {
+         Q_EMIT frameGeometryChanged(this, oldFrameGeometry);
+     }
++    if (oldOutput != m_output) {
++        Q_EMIT screenChanged();
++    }
+     Q_EMIT geometryShapeChanged(this, oldFrameGeometry);
+ }
+ 
+diff --git a/src/x11client.cpp b/src/x11client.cpp
+index ce275fff1b..d7ed823128 100644
+--- a/src/x11client.cpp
++++ b/src/x11client.cpp
+@@ -4062,6 +4062,8 @@ void X11Client::moveResizeInternal(const QRect &rect, MoveResizeMode mode)
+             m_lastClientGeometry == m_clientGeometry) {
+         return;
+     }
++
++    m_output = kwinApp()->platform()->outputAt(frameGeometry.center());
+     if (areGeometryUpdatesBlocked()) {
+         setPendingMoveResizeMode(mode);
+         return;
+@@ -4070,6 +4072,7 @@ void X11Client::moveResizeInternal(const QRect &rect, MoveResizeMode mode)
+     const QRect oldBufferGeometry = m_lastBufferGeometry;
+     const QRect oldFrameGeometry = m_lastFrameGeometry;
+     const QRect oldClientGeometry = m_lastClientGeometry;
++    const AbstractOutput *oldOutput = m_lastOutput;
+ 
+     updateServerGeometry();
+     updateWindowRules(Rules::Position|Rules::Size);
+@@ -4077,6 +4080,7 @@ void X11Client::moveResizeInternal(const QRect &rect, MoveResizeMode mode)
+     m_lastBufferGeometry = m_bufferGeometry;
+     m_lastFrameGeometry = m_frameGeometry;
+     m_lastClientGeometry = m_clientGeometry;
++    m_lastOutput = m_output;
+ 
+     if (isActive()) {
+         workspace()->setActiveOutput(output());
+@@ -4092,6 +4096,9 @@ void X11Client::moveResizeInternal(const QRect &rect, MoveResizeMode mode)
+     if (oldFrameGeometry != m_frameGeometry) {
+         Q_EMIT frameGeometryChanged(this, oldFrameGeometry);
+     }
++    if (oldOutput != m_output) {
++        Q_EMIT screenChanged();
++    }
+     Q_EMIT geometryShapeChanged(this, oldFrameGeometry);
+ }
+ 
+diff --git a/src/x11client.h b/src/x11client.h
+index b523044d3d..adb8b0e8df 100644
+--- a/src/x11client.h
++++ b/src/x11client.h
+@@ -524,6 +524,7 @@ private:
+     QMetaObject::Connection m_edgeGeometryTrackingConnection;
+ 
+     QMargins m_clientFrameExtents;
++    AbstractOutput *m_lastOutput = nullptr;
+     QRect m_lastBufferGeometry;
+     QRect m_lastFrameGeometry;
+     QRect m_lastClientGeometry;
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-fix-plasmashell-crash-2.patch b/kde-plasma/kwin/files/kwin-5.24.5-fix-plasmashell-crash-2.patch
new file mode 100644
index 000000000000..026efdf9465b
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-fix-plasmashell-crash-2.patch
@@ -0,0 +1,35 @@
+From a8477c1cf7acbf3358c85e53b236150dd43b4640 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Thu, 14 Apr 2022 18:48:56 +0200
+Subject: [PATCH] toplevel: set valid output in the constructor
+
+This makes it less easy to cause crashes and fixes some segfaults.
+
+BUG: 452433
+BUG: 448064
+
+(cherry picked from commit e48a5c0535f01dc380449ba8481c869ff23e5558)
+
+Tested-by: Merge Service <https://invent.kde.org/plasma/kwin/-/merge_requests/2448>
+Part-of: <https://invent.kde.org/plasma/kwin/-/merge_requests/2448>
+---
+ src/toplevel.cpp | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/toplevel.cpp b/src/toplevel.cpp
+index ff216835c4..5d3d7a5dde 100644
+--- a/src/toplevel.cpp
++++ b/src/toplevel.cpp
+@@ -34,7 +34,8 @@ namespace KWin
+ {
+ 
+ Toplevel::Toplevel()
+-    : m_visual(XCB_NONE)
++    : m_output(workspace()->activeOutput())
++    , m_visual(XCB_NONE)
+     , bit_depth(24)
+     , info(nullptr)
+     , ready_for_painting(false)
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-update-device-outputName.patch b/kde-plasma/kwin/files/kwin-5.24.5-update-device-outputName.patch
new file mode 100644
index 000000000000..d1dbb3fb9bb8
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-update-device-outputName.patch
@@ -0,0 +1,32 @@
+From 1b96d21507a3b6b0a9ac6eac424d4e4db5602839 Mon Sep 17 00:00:00 2001
+From: David Redondo <kde@david-redondo.de>
+Date: Wed, 18 May 2022 13:34:45 +0200
+Subject: [PATCH] Update device outputName when setting output
+
+BUG:451279
+FIXED-IN:5.25.0
+
+
+(cherry picked from commit d3a37aa9aef58fbaedcef77d2797c22a015dc9c0)
+---
+ src/backends/libinput/device.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/backends/libinput/device.cpp b/src/backends/libinput/device.cpp
+index f247b66d74..30f51aca3c 100644
+--- a/src/backends/libinput/device.cpp
++++ b/src/backends/libinput/device.cpp
+@@ -668,8 +668,10 @@ void Device::setOutput(AbstractOutput *output)
+ {
+     m_output = output;
+     if (m_output) {
++        m_outputName = output->name();
+         writeEntry(ConfigKey::OutputName, output->name());
+     } else {
++        m_outputName = QString();
+         writeEntry(ConfigKey::OutputName, QString());
+     }
+     Q_EMIT outputNameChanged();
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.24.5-r2.ebuild b/kde-plasma/kwin/kwin-5.24.5-r2.ebuild
new file mode 100644
index 000000000000..c4afd02c8fc6
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.24.5-r2.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.19
+	>=dev-libs/wayland-1.2
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[gles2-only=,libinput]
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=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
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	>=kde-plasma/kscreenlocker-${PVCUT}:5
+	>=kde-plasma/kwayland-server-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	>=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+	test? (
+		dev-libs/plasma-wayland-protocols
+		>=dev-libs/wayland-protocols-1.19
+	)
+"
+BDEPEND="test? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-multi-gpu-double-copy.patch # KDE-bug 453386
+	"${FILESDIR}"/${P}-tabbox-dont-dismiss-popups.patch # KDE-bug 446318
+	"${FILESDIR}"/${P}-effects-overview-hide-panels.patch # KDE-bug 444274
+	"${FILESDIR}"/${P}-fix-nvidia-render-glitches.patch
+	"${FILESDIR}"/${P}-update-device-outputName.patch # KDE-bug 451279
+	"${FILESDIR}"/${P}-fix-plasmashell-crash-{1,2}.patch # KDE-bugs 448064, 452433
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2022-05-17 19:02 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2022-05-17 19:02 UTC (permalink / raw
  To: gentoo-commits

commit:     cb2f22e3e5634860303b198e6b5a4450865d9009
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue May 17 18:12:40 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue May 17 19:01:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb2f22e3

kde-plasma/kwin: Backport several 5.24.6 fixes

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin-5.24.5-effects-overview-hide-panels.patch |  65 ++++++++++
 .../kwin-5.24.5-fix-multi-gpu-double-copy.patch    |  59 +++++++++
 .../kwin-5.24.5-fix-nvidia-render-glitches.patch   |  42 +++++++
 .../kwin-5.24.5-tabbox-dont-dismiss-popups.patch   |  32 +++++
 kde-plasma/kwin/kwin-5.24.5-r1.ebuild              | 140 +++++++++++++++++++++
 5 files changed, 338 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-effects-overview-hide-panels.patch b/kde-plasma/kwin/files/kwin-5.24.5-effects-overview-hide-panels.patch
new file mode 100644
index 000000000000..d5b1f8c3864e
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-effects-overview-hide-panels.patch
@@ -0,0 +1,65 @@
+From 7fcf36d636f62f101397d88ad6c448f54da79e46 Mon Sep 17 00:00:00 2001
+From: Marco Martin <notmart@gmail.com>
+Date: Fri, 13 May 2022 15:37:13 +0000
+Subject: [PATCH] effects/overview: hide panels
+
+This makes it consistent with WindowView (and the panel window doesn't respond
+to input anyways even if shown, which is misleading).
+
+BUG: 444274
+FIXED-IN: 5.24.6
+
+
+(cherry picked from commit db2af5500f964f3eefde60183b69f21125aeb194)
+---
+ src/effects/overview/qml/ScreenView.qml | 20 ++++++++------------
+ 1 file changed, 8 insertions(+), 12 deletions(-)
+
+diff --git a/src/effects/overview/qml/ScreenView.qml b/src/effects/overview/qml/ScreenView.qml
+index 40cc29f4c7..39119e40b9 100644
+--- a/src/effects/overview/qml/ScreenView.qml
++++ b/src/effects/overview/qml/ScreenView.qml
+@@ -70,16 +70,8 @@ FocusScope {
+         }
+     }
+ 
+-    ExpoArea {
+-        id: heapArea
+-        screen: targetScreen
+-    }
+-
+     Column {
+-        x: heapArea.x
+-        y: heapArea.y
+-        width: heapArea.width
+-        height: heapArea.height
++        anchors.fill: parent
+ 
+         Item {
+             id: topBar
+@@ -176,15 +168,19 @@ FocusScope {
+ 
+         KWinComponents.WindowThumbnailItem {
+             id: windowThumbnail
+-            visible: !model.client.hidden
++            visible: !model.client.hidden && opacity > 0
+             wId: model.client.internalId
+             x: model.client.x - targetScreen.geometry.x
+             y: model.client.y - targetScreen.geometry.y
+             width: model.client.width
+             height: model.client.height
++            opacity: container.effect.gestureInProgress
++                ? 1 - container.effect.partialActivationFactor
++                : (model.client.hidden || container.organized) ? 0 : 1
+ 
+-            TapHandler {
+-                onTapped: effect.deactivate();
++            Behavior on opacity {
++                enabled: !container.effect.gestureInProgress
++                NumberAnimation { duration: animationDuration; easing.type: Easing.OutCubic }
+             }
+         }
+     }
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-fix-multi-gpu-double-copy.patch b/kde-plasma/kwin/files/kwin-5.24.5-fix-multi-gpu-double-copy.patch
new file mode 100644
index 000000000000..53c05da522ec
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-fix-multi-gpu-double-copy.patch
@@ -0,0 +1,59 @@
+From 3b58fe4bde0722b352e4114adb992a2ed2c96423 Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Sat, 7 May 2022 21:23:17 +0200
+Subject: [PATCH] backends/drm: consider escaped separators KWIN_DRM_DEVICES
+
+':' conflicts with the file names in /dev/dri/by-path, so allow it to be
+escaped with '\'
+
+CCBUG: 453386
+
+
+(cherry picked from commit a110aabbccf56019bdc324b3c751112f35ec3f6c)
+---
+ src/backends/drm/drm_backend.cpp | 24 +++++++++++++++++++++++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/src/backends/drm/drm_backend.cpp b/src/backends/drm/drm_backend.cpp
+index 272dba702c..567ea3f696 100644
+--- a/src/backends/drm/drm_backend.cpp
++++ b/src/backends/drm/drm_backend.cpp
+@@ -57,12 +57,34 @@
+ namespace KWin
+ {
+ 
++static QStringList splitPathList(const QString &input, const QChar delimiter)
++{
++    QStringList ret;
++    QString tmp;
++    for (int i = 0; i < input.size(); i++) {
++        if (input[i] == delimiter) {
++            if (i > 0 && input[i - 1] == '\\') {
++                tmp[tmp.size() - 1] = delimiter;
++            } else if (!tmp.isEmpty()) {
++                ret.append(tmp);
++                tmp = QString();
++            }
++        } else {
++            tmp.append(input[i]);
++        }
++    }
++    if (!tmp.isEmpty()) {
++        ret.append(tmp);
++    }
++    return ret;
++}
++
+ DrmBackend::DrmBackend(QObject *parent)
+     : Platform(parent)
+     , m_udev(new Udev)
+     , m_udevMonitor(m_udev->monitor())
+     , m_session(Session::create(this))
+-    , m_explicitGpus(qEnvironmentVariable("KWIN_DRM_DEVICES").split(':', Qt::SkipEmptyParts))
++    , m_explicitGpus(splitPathList(qEnvironmentVariable("KWIN_DRM_DEVICES"), ':'))
+     , m_dpmsFilter()
+ {
+     setSupportsPointerWarping(true);
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-fix-nvidia-render-glitches.patch b/kde-plasma/kwin/files/kwin-5.24.5-fix-nvidia-render-glitches.patch
new file mode 100644
index 000000000000..d38e11375bbe
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-fix-nvidia-render-glitches.patch
@@ -0,0 +1,42 @@
+From e2d271b6365188a86755af82745ad37535ceb4d7 Mon Sep 17 00:00:00 2001
+From: Erik Kurzinger <ekurzinger@nvidia.com>
+Date: Sun, 8 May 2022 12:16:20 -0700
+Subject: [PATCH] platforms/drm: set read buffer in
+ GbmSurface::makeContextCurrent
+
+The first time the GBM backend's EGL context is made current after
+creation, both the read and draw surfaces are set to EGL_NO_SURFACE.
+This will set the GL read and draw buffers to GL_NONE in accordance with
+the EGL spec.
+
+When a real surface is later made current, however, the spec is arguably
+unclear on whether the read and draw buffers should remain set to
+GL_NONE or whether they should be restored to the default GL_BACK.  The
+Mesa driver does the latter, the NVIDIA driver does the former.
+
+To work around this difference, Kwin has an explicit call to
+glDrawBuffer in GbmSurface::makeContextCurrent. It does not have a
+corresponding call to glReadBuffer, though, which can cause some desktop
+effects such as background contrast to render incorrectly with the
+NVIDIA driver. This change adds that missing call.
+
+(cherry picked from commit e6d2bc153f499d1ec3510c02badca38d4c42c340)
+---
+ src/backends/drm/egl_gbm_backend.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/backends/drm/egl_gbm_backend.cpp b/src/backends/drm/egl_gbm_backend.cpp
+index 5a0be7ccaf..b34fa1320b 100644
+--- a/src/backends/drm/egl_gbm_backend.cpp
++++ b/src/backends/drm/egl_gbm_backend.cpp
+@@ -377,6 +377,7 @@ bool EglGbmBackend::makeContextCurrent(const Output::RenderData &render) const
+     }
+     if (!GLPlatform::instance()->isGLES()) {
+         glDrawBuffer(GL_BACK);
++        glReadBuffer(GL_BACK);
+     }
+     return true;
+ }
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.24.5-tabbox-dont-dismiss-popups.patch b/kde-plasma/kwin/files/kwin-5.24.5-tabbox-dont-dismiss-popups.patch
new file mode 100644
index 000000000000..f79d4bba71ce
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.24.5-tabbox-dont-dismiss-popups.patch
@@ -0,0 +1,32 @@
+From f7b1edc79e9526fe6bad69a8ad475a5d77e5aead Mon Sep 17 00:00:00 2001
+From: Xaver Hugl <xaver.hugl@gmail.com>
+Date: Tue, 10 May 2022 13:07:03 +0200
+Subject: [PATCH] tabbox: don't dismiss popups
+
+The glitches that dismissing popups was supposed to prevent are apparently
+no longer present.
+
+BUG: 446318
+(cherry picked from commit 94b0ca814688bf3622aa53f4d4d26f97d8de7306)
+---
+ src/tabbox/tabbox.cpp | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp
+index a1c50b27fc..76a50795ad 100644
+--- a/src/tabbox/tabbox.cpp
++++ b/src/tabbox/tabbox.cpp
+@@ -1020,10 +1020,6 @@ void TabBox::navigatingThroughWindows(bool forward, const QKeySequence &shortcut
+         // CDE style raise / lower
+         CDEWalkThroughWindows(forward);
+     } else {
+-        workspace()->forEachAbstractClient([](Toplevel *toplevel) {
+-            if (toplevel->isPopupWindow())
+-                toplevel->popupDone();
+-        });
+         if (areModKeysDepressed(shortcut)) {
+             if (startKDEWalkThroughWindows(mode))
+                 KDEWalkThroughWindows(forward);
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.24.5-r1.ebuild b/kde-plasma/kwin/kwin-5.24.5-r1.ebuild
new file mode 100644
index 000000000000..12d15b83a199
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.24.5-r1.ebuild
@@ -0,0 +1,140 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.19
+	>=dev-libs/wayland-1.2
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[gles2-only=,libinput]
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=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
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	>=kde-plasma/kscreenlocker-${PVCUT}:5
+	>=kde-plasma/kwayland-server-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	>=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+	test? (
+		dev-libs/plasma-wayland-protocols
+		>=dev-libs/wayland-protocols-1.19
+	)
+"
+BDEPEND="test? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-fix-multi-gpu-double-copy.patch # KDE-bug 453386
+	"${FILESDIR}"/${P}-tabbox-dont-dismiss-popups.patch # KDE-bug 446318
+	"${FILESDIR}"/${P}-effects-overview-hide-panels.patch # KDE-bug 444274
+	"${FILESDIR}"/${P}-fix-nvidia-render-glitches.patch
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2022-04-18 14:17 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2022-04-18 14:17 UTC (permalink / raw
  To: gentoo-commits

commit:     23e47003cf63c24dda9601d60d35e08f29e44468
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 11 13:32:52 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Apr 18 14:16:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23e47003

kde-plasma/kwin: Various stability fixes

Upstream commits:
9d38f57d84fb9a6f2c4e60f7051f685842f34e0f
52035f43b90738e2efb4fd7b482719c1ea458578
388402c3b1b37d9f72597aae8d6670e8c0edeb14
82c2324b5675ea2d5e3b962f270bda1d186e7326
a5404234dbd26e170acb97789599fbcd705cf6cb
a35e3075a7aa4616c8930ccd3869dc4cca5d287e
c1d7919ad7cc8a7e55f5b93ec84de63547bc53b9
7a26f93cb579cf6b1cbc1e32790f93be70013157
ee625b2d8acad2ba81693107740a12d8a03863c0

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=452334
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=452171
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=450564
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=447705
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...5.24.4-backends-drm-dont-perm-disable-vrr.patch |  32 +++
 ...5.24.4-backends-drm-fetch-immutable-blobs.patch | 214 +++++++++++++++++++++
 .../kwin-5.24.4-dont-send-geom-to-text-input.patch |  26 +++
 .../kwin-5.24.4-dont-use-xcb-in-wayland.patch      |  41 ++++
 .../kwin-5.24.4-fix-current-VD-always-added.patch  |  50 +++++
 ...win-5.24.4-fix-unlocking-wayland-sessions.patch |  44 +++++
 ...kwin-5.24.4-waylandserver-lockScreenShown.patch |  93 +++++++++
 ...server-move-LockScreenPresentationWatcher.patch |  36 ++++
 ...win-5.24.4-xdgactivation-demand-attention.patch |  32 +++
 kde-plasma/kwin/kwin-5.24.4-r1.ebuild              | 145 ++++++++++++++
 10 files changed, 713 insertions(+)

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.24.4-r1.ebuild b/kde-plasma/kwin/kwin-5.24.4-r1.ebuild
new file mode 100644
index 000000000000..e84dda447284
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.24.4-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.90.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.19
+	>=dev-libs/wayland-1.2
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[gles2-only=,libinput]
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=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
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	>=kde-plasma/kscreenlocker-${PVCUT}:5
+	>=kde-plasma/kwayland-server-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	>=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+	test? (
+		dev-libs/plasma-wayland-protocols
+		>=dev-libs/wayland-protocols-1.19
+	)
+"
+BDEPEND="test? ( >=dev-qt/qtwaylandscanner-${QTMIN}:5 )"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+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
+	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2022-02-06 21:17 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2022-02-06 21:17 UTC (permalink / raw
  To: gentoo-commits

commit:     90eb423988d9b3f94bef702e3b988e2e2c0f4cc8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Feb  6 20:31:34 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Feb  6 21:16:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90eb4239

kde-plasma/kwin: Fix ProvidersUrl

See also:
https://mail.kde.org/pipermail/distributions/2022-February/001124.html
https://mail.kde.org/pipermail/distributions/2022-February/001127.html

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin/files/kwin-5.23.5-fix-ProvidersUrl.patch  | 71 ++++++++++++++++++++++
 .../{kwin-5.23.5.ebuild => kwin-5.23.5-r1.ebuild}  |  3 +
 ...{kwin-5.23.90.ebuild => kwin-5.23.90-r1.ebuild} |  3 +
 3 files changed, 77 insertions(+)

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
new file mode 100644
index 000000000000..8829ec286f70
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.5-fix-ProvidersUrl.patch
@@ -0,0 +1,71 @@
+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/kwin-5.23.5.ebuild b/kde-plasma/kwin/kwin-5.23.5-r1.ebuild
similarity index 96%
rename from kde-plasma/kwin/kwin-5.23.5.ebuild
rename to kde-plasma/kwin/kwin-5.23.5-r1.ebuild
index 6a8b24a358d7..daceebb79c40 100644
--- a/kde-plasma/kwin/kwin-5.23.5.ebuild
+++ b/kde-plasma/kwin/kwin-5.23.5-r1.ebuild
@@ -97,6 +97,9 @@ DEPEND="${COMMON_DEPEND}
 "
 PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
 
+# https://mail.kde.org/pipermail/distributions/2022-February/001127.html
+PATCHES=( "${FILESDIR}/${P}-fix-ProvidersUrl.patch" )
+
 src_prepare() {
 	ecm_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"

diff --git a/kde-plasma/kwin/kwin-5.23.90.ebuild b/kde-plasma/kwin/kwin-5.23.90-r1.ebuild
similarity index 96%
rename from kde-plasma/kwin/kwin-5.23.90.ebuild
rename to kde-plasma/kwin/kwin-5.23.90-r1.ebuild
index 92235562b5a5..6f373b80731f 100644
--- a/kde-plasma/kwin/kwin-5.23.90.ebuild
+++ b/kde-plasma/kwin/kwin-5.23.90-r1.ebuild
@@ -98,6 +98,9 @@ DEPEND="${COMMON_DEPEND}
 "
 PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
 
+# https://mail.kde.org/pipermail/distributions/2022-February/001127.html
+PATCHES=( "${FILESDIR}/${PN}-5.23.5-fix-ProvidersUrl.patch" )
+
 src_prepare() {
 	ecm_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2021-12-15 11:28 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2021-12-15 11:28 UTC (permalink / raw
  To: gentoo-commits

commit:     7a001371308fa1aaa8ddcc8ac77c768fa13f783a
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 15 10:34:24 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 15 11:28:05 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a001371

kde-plasma/kwin: Fix window sizing glitches, memleak/crash fixes

Upstream commit 77b678c522cce0e8e7b39087f74e2ac591cd28d0
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445140

Upstream commit 8accc777a5b3ab1e53341f1838ed636652dc1221
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444429
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444381
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444077
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=444429

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...5.23.4-fix-memory-leak-caching-QSGTexture.patch |  50 ++++++++
 ...gshell-protect-from-invalid-frameGeometry.patch |  36 ++++++
 kde-plasma/kwin/kwin-5.23.4-r2.ebuild              | 139 +++++++++++++++++++++
 3 files changed, 225 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch b/kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch
new file mode 100644
index 000000000000..5abcfa49969c
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.4-fix-memory-leak-caching-QSGTexture.patch
@@ -0,0 +1,50 @@
+From 8accc777a5b3ab1e53341f1838ed636652dc1221 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Mon, 13 Dec 2021 12:53:32 +0200
+Subject: [PATCH] Fix memory leak in some plasma components
+
+A few plasma components cache QSGTexture. Those components rely on
+texture references going away with QSGNode users. However, with the
+current tear down logic, OffscreenQuickView won't destroy any paint
+nodes.
+
+Destroy QQuickRenderControl before QQuickWindow to ensure that are no
+paint nodes left alive after OffscreenQuickView.
+
+BUG: 444429
+BUG: 444381
+BUG: 444077
+BUG: 444306
+(cherry picked from commit 64f2cdf9ed290a1fb7c2bf41753613078eb023c4)
+---
+ src/libkwineffects/kwineffectquickview.cpp | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/src/libkwineffects/kwineffectquickview.cpp b/src/libkwineffects/kwineffectquickview.cpp
+index ca5a025729..14be1e1b25 100644
+--- a/src/libkwineffects/kwineffectquickview.cpp
++++ b/src/libkwineffects/kwineffectquickview.cpp
+@@ -160,13 +160,15 @@ EffectQuickView::EffectQuickView(QObject *parent, QWindow *renderWindow, ExportM
+ EffectQuickView::~EffectQuickView()
+ {
+     if (d->m_glcontext) {
+-        d->m_glcontext->makeCurrent(d->m_offscreenSurface.data());
+         // close the view whilst we have an active GL context
+-        delete d->m_view;
+-        d->m_view = nullptr;
+-        d->m_renderControl->invalidate();
+-        d->m_glcontext->doneCurrent();
++        d->m_glcontext->makeCurrent(d->m_offscreenSurface.data());
+     }
++
++    delete d->m_renderControl; // Always delete render control first.
++    d->m_renderControl = nullptr;
++
++    delete d->m_view;
++    d->m_view = nullptr;
+ }
+ 
+ bool EffectQuickView::automaticRepaint() const
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch b/kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch
new file mode 100644
index 000000000000..a80348be3562
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.4-xdgshell-protect-from-invalid-frameGeometry.patch
@@ -0,0 +1,36 @@
+From 77b678c522cce0e8e7b39087f74e2ac591cd28d0 Mon Sep 17 00:00:00 2001
+From: Ismael Asensio <isma.af@gmail.com>
+Date: Sun, 12 Dec 2021 15:16:28 +0100
+Subject: [PATCH] XDGShellClient: Protect from invalid frameGeometry on
+ updateDecoration
+
+When updating window decoration do not try to restore the previous frameGeometry
+if it was invalid.
+
+This fixes the case when applying a `noBorder=true` rule on a newly created
+client would set it to a minimal window size
+
+Targeted at 5.23 only, since this codepath is being reworked for 5.24
+
+BUG: 445140
+FIXED-IN: 5.23.5
+---
+ src/xdgshellclient.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp
+index b4427b8cf7..75c4031498 100644
+--- a/src/xdgshellclient.cpp
++++ b/src/xdgshellclient.cpp
+@@ -637,7 +637,7 @@ void XdgToplevelClient::updateDecoration(bool check_workspace_pos, bool force)
+         scheduleConfigure();
+     }
+     updateShadow();
+-    if (check_workspace_pos) {
++    if (check_workspace_pos && oldFrameGeometry.isValid()) {
+         const QRect oldGeometryRestore = geometryRestore();
+         setGeometryRestore(frameGeometry());
+         checkWorkspacePosition(oldFrameGeometry, oldClientGeometry);
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.23.4-r2.ebuild b/kde-plasma/kwin/kwin-5.23.4-r2.ebuild
new file mode 100644
index 000000000000..dcbd921d6a07
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.23.4-r2.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.86.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org optfeature
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="accessibility caps gles2-only multimedia plasma screencast"
+
+RESTRICT="test"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.14
+	>=dev-libs/wayland-1.2
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[gles2-only=,libinput]
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kcrash-${KFMIN}:5
+	>=kde-frameworks/kdeclarative-${KFMIN}:5
+	>=kde-frameworks/kglobalaccel-${KFMIN}:5=
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5=[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	>=kde-plasma/kscreenlocker-${PVCUT}:5
+	>=kde-plasma/kwayland-server-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/lcms:2
+	media-libs/libepoxy
+	>=media-libs/mesa-21.1[egl(+),gbm(+),wayland,X]
+	virtual/libudev:=
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	accessibility? ( media-libs/libqaccessibilityclient:5 )
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+	plasma? ( >=kde-frameworks/krunner-${KFMIN}:5 )
+	screencast? ( >=media-video/pipewire-0.3:= )
+"
+RDEPEND="${COMMON_DEPEND}
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	sys-apps/hwdata
+	x11-base/xwayland
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+	test? (
+		>=dev-libs/wayland-protocols-1.19
+		>=dev-qt/qtwayland-${QTMIN}:5
+	)
+"
+PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-wayland-resize-to-last-requested-client-size.patch # KDE-bug 444962
+	"${FILESDIR}"/${P}-scripting-fix-KWinComponents-Workspace-type.patch
+	"${FILESDIR}"/${P}-drm-remove-dpms-filter-when-outputs-are-added.patch # KDE-bug 446699
+	"${FILESDIR}"/${P}-xdgshell-protect-from-invalid-frameGeometry.patch # KDE-bug 445140
+	"${FILESDIR}"/${P}-fix-memory-leak-caching-QSGTexture.patch # KDE-bug 444077 +more
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.21.80-gstreamer-optional.patch"
+
+	# TODO: try to get a build switch upstreamed
+	if ! use screencast; then
+		sed -e "s/^pkg_check_modules.*PipeWire/#&/" -i CMakeLists.txt || die
+	fi
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package accessibility QAccessibilityClient)
+		$(cmake_use_find_package caps Libcap)
+		$(cmake_use_find_package plasma KF5Runner)
+	)
+
+	ecm_src_configure
+}
+
+pkg_postinst() {
+	ecm_pkg_postinst
+	optfeature "color management support" x11-misc/colord
+	elog
+	elog "In Plasma 5.20, default behavior of the Task Switcher to move minimised"
+	elog "windows to the end of the list was changed so that it remains in the"
+	elog "original order. To revert to the well established behavior:"
+	elog
+	elog " - Edit ~/.config/kwinrc"
+	elog " - Find [TabBox] section"
+	elog " - Add \"MoveMinimizedWindowsToEndOfTabBoxFocusChain=true\""
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2021-11-23 14:59 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2021-11-23 14:59 UTC (permalink / raw
  To: gentoo-commits

commit:     05d8b1ff72e2697b27b3cb2284d0e722202a6bf6
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 22 16:14:44 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 23 14:59:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05d8b1ff

kde-plasma/kwin: Fix wrong window size in some cases

Upstream commits:
325208347c40d7311aea83572b5150ba3750cba9
1ba7b5ec63b61fa00b7eac59a1beca12323fefb3

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=445444
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-enable-window-rules-for-all-xdg-toplevel.patch | 132 +++++++++++++++++++++
 .../kwin/files/kwin-5.23.3-revert-2560288e.patch   |  35 ++++++
 kde-plasma/kwin/kwin-5.23.3-r1.ebuild              |   2 +
 3 files changed, 169 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.23.3-enable-window-rules-for-all-xdg-toplevel.patch b/kde-plasma/kwin/files/kwin-5.23.3-enable-window-rules-for-all-xdg-toplevel.patch
new file mode 100644
index 000000000000..fa52bd7a3481
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.3-enable-window-rules-for-all-xdg-toplevel.patch
@@ -0,0 +1,132 @@
+From 1ba7b5ec63b61fa00b7eac59a1beca12323fefb3 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Wed, 17 Nov 2021 18:36:00 +0200
+Subject: [PATCH] wayland: Enable window rules for all xdg-toplevel
+
+If a window wants to be initially shown in fullscreen mode, it will
+issue an xdg_toplevel.set_fullscreen request before the first surface
+commit.
+
+If a window wants to be shown in fullscreen mode and there hasn't been
+any first surface commit, kwin will cache the request and apply
+fullscreen mode when checking window rules in the initialize() function.
+
+On the other hand, window rules are disabled for plasma surfaces. The
+motivation behind that was to forbid user from messing with plasma's
+surfaces (this change was suggested during redesign of xdg-shell
+implementation).
+
+As it turns out, there are cases where plasma may ask to show a window
+in fullscreen mode, which also has a plasma surface installed, e.g.
+fullscreen application dashboard.
+
+In order to fix the dashboard, this change allows window rules to be
+applied to xdg-toplevel windows that also have plasma surfaces installed.
+
+As is, xdg-toplevel surfaces and plasma surfaces are very different in
+nature. Adding more quirks to handle plasma surfaces in
+XdgToplevelClient is not worth the effort and there are better
+alternatives, e.g. layer-shell.
+
+
+(cherry picked from commit 039b1d031e3e30c238c8d67ade376c6d52297d81)
+---
+ src/xdgshellclient.cpp | 65 +++++++++++++++++++++---------------------
+ 1 file changed, 32 insertions(+), 33 deletions(-)
+
+diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp
+index 9e8216a3a0..b4427b8cf7 100644
+--- a/src/xdgshellclient.cpp
++++ b/src/xdgshellclient.cpp
+@@ -647,7 +647,7 @@ void XdgToplevelClient::updateDecoration(bool check_workspace_pos, bool force)
+ 
+ bool XdgToplevelClient::supportsWindowRules() const
+ {
+-    return !m_plasmaShellSurface;
++    return true;
+ }
+ 
+ StrutRect XdgToplevelClient::strutRect(StrutArea area) const
+@@ -946,7 +946,7 @@ void XdgToplevelClient::handleWindowClassChanged()
+ {
+     const QByteArray applicationId = m_shellSurface->windowClass().toUtf8();
+     setResourceClass(resourceName(), applicationId);
+-    if (shellSurface()->isConfigured() && supportsWindowRules()) {
++    if (shellSurface()->isConfigured()) {
+         evaluateWindowRules();
+     }
+     setDesktopFileName(applicationId);
+@@ -1196,40 +1196,39 @@ void XdgToplevelClient::initialize()
+     // is sent if the client has called the set_mode() request with csd mode.
+     updateDecoration(false, true);
+ 
+-    if (supportsWindowRules()) {
+-        setupWindowRules(false);
+-
+-        moveResize(rules()->checkGeometry(frameGeometry(), true));
+-        maximize(rules()->checkMaximize(initialMaximizeMode(), true));
+-        setFullScreen(rules()->checkFullScreen(initialFullScreenMode(), true), false);
+-        setOnActivities(rules()->checkActivity(activities(), true));
+-        setDesktops(rules()->checkDesktops(desktops(), true));
+-        setDesktopFileName(rules()->checkDesktopFile(desktopFileName(), true).toUtf8());
+-        if (rules()->checkMinimize(isMinimized(), true)) {
+-            minimize(true); // No animation.
+-        }
+-        setSkipTaskbar(rules()->checkSkipTaskbar(skipTaskbar(), true));
+-        setSkipPager(rules()->checkSkipPager(skipPager(), true));
+-        setSkipSwitcher(rules()->checkSkipSwitcher(skipSwitcher(), true));
+-        setKeepAbove(rules()->checkKeepAbove(keepAbove(), true));
+-        setKeepBelow(rules()->checkKeepBelow(keepBelow(), true));
+-        setShortcut(rules()->checkShortcut(shortcut().toString(), true));
+-        setNoBorder(rules()->checkNoBorder(noBorder(), true));
++    setupWindowRules(false);
++
++    moveResize(rules()->checkGeometry(frameGeometry(), true));
++    maximize(rules()->checkMaximize(initialMaximizeMode(), true));
++    setFullScreen(rules()->checkFullScreen(initialFullScreenMode(), true), false);
++    setOnActivities(rules()->checkActivity(activities(), true));
++    setDesktops(rules()->checkDesktops(desktops(), true));
++    setDesktopFileName(rules()->checkDesktopFile(desktopFileName(), true).toUtf8());
++    if (rules()->checkMinimize(isMinimized(), true)) {
++        minimize(true); // No animation.
++    }
++    setSkipTaskbar(rules()->checkSkipTaskbar(skipTaskbar(), true));
++    setSkipPager(rules()->checkSkipPager(skipPager(), true));
++    setSkipSwitcher(rules()->checkSkipSwitcher(skipSwitcher(), true));
++    setKeepAbove(rules()->checkKeepAbove(keepAbove(), true));
++    setKeepBelow(rules()->checkKeepBelow(keepBelow(), true));
++    setShortcut(rules()->checkShortcut(shortcut().toString(), true));
++    setNoBorder(rules()->checkNoBorder(noBorder(), true));
++
++    // Don't place the client if its position is set by a rule.
++    if (rules()->checkPosition(invalidPoint, true) != invalidPoint) {
++        needsPlacement = false;
++    }
+ 
+-        // Don't place the client if its position is set by a rule.
+-        if (rules()->checkPosition(invalidPoint, true) != invalidPoint) {
+-            needsPlacement = false;
+-        }
++    // Don't place the client if the maximize state is set by a rule.
++    if (requestedMaximizeMode() != MaximizeRestore) {
++        needsPlacement = false;
++    }
+ 
+-        // Don't place the client if the maximize state is set by a rule.
+-        if (requestedMaximizeMode() != MaximizeRestore) {
+-            needsPlacement = false;
+-        }
++    discardTemporaryRules();
++    RuleBook::self()->discardUsed(this, false); // Remove Apply Now rules.
++    updateWindowRules(Rules::All);
+ 
+-        discardTemporaryRules();
+-        RuleBook::self()->discardUsed(this, false); // Remove Apply Now rules.
+-        updateWindowRules(Rules::All);
+-    }
+     if (isRequestedFullScreen()) {
+         needsPlacement = false;
+     }
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/files/kwin-5.23.3-revert-2560288e.patch b/kde-plasma/kwin/files/kwin-5.23.3-revert-2560288e.patch
new file mode 100644
index 000000000000..db91c918ec3d
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.23.3-revert-2560288e.patch
@@ -0,0 +1,35 @@
+From 325208347c40d7311aea83572b5150ba3750cba9 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Tue, 16 Nov 2021 22:37:26 +0200
+Subject: [PATCH] Revert "wayland: Check workspace position when preferred deco
+ mode changes"
+
+This reverts commit 2560288e4b66acfdbb8a8f4daafd2d600aeb525a.
+
+It broke alacricitty. The fix is not obvious, so revert the commit for
+the time being.
+
+BUG: 445444
+
+
+(cherry picked from commit 068d60e36a112c6b901010331ef3a995019c97cb)
+---
+ src/xdgshellclient.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/xdgshellclient.cpp b/src/xdgshellclient.cpp
+index af1bd57ac7..9e8216a3a0 100644
+--- a/src/xdgshellclient.cpp
++++ b/src/xdgshellclient.cpp
+@@ -1317,7 +1317,7 @@ void XdgToplevelClient::installXdgDecoration(XdgToplevelDecorationV1Interface *d
+     connect(m_xdgDecoration, &XdgToplevelDecorationV1Interface::preferredModeChanged, this, [this] {
+         if (m_isInitialized) {
+             // force is true as we must send a new configure response.
+-            updateDecoration(/* check_workspace_pos */ true, /* force */ true);
++            updateDecoration(/* check_workspace_pos */ false, /* force */ true);
+         }
+     });
+ }
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.23.3-r1.ebuild b/kde-plasma/kwin/kwin-5.23.3-r1.ebuild
index cf0d965820df..24a401f083d2 100644
--- a/kde-plasma/kwin/kwin-5.23.3-r1.ebuild
+++ b/kde-plasma/kwin/kwin-5.23.3-r1.ebuild
@@ -102,6 +102,8 @@ PDEPEND=">=kde-plasma/kde-cli-tools-${PVCUT}:5"
 
 PATCHES=(
 	"${FILESDIR}/${P}-fix-xwayland-abstract-socket-addr.patch" # KDE-bug 442362, bug 813888
+	"${FILESDIR}/${P}-revert-2560288e.patch" # KDE-bug 445444
+	"${FILESDIR}/${P}-enable-window-rules-for-all-xdg-toplevel.patch"
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2021-09-15 17:42 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2021-09-15 17:42 UTC (permalink / raw
  To: gentoo-commits

commit:     098f5a7919fe1d090eaf56b6b6b95e9dc7e1ad39
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 15 17:41:53 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Sep 15 17:42:02 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=098f5a79

kde-plasma/kwin: Fix build on x86

Tested-by: David Flogeras <dflogeras2 <AT> gmail.com>
Closes: https://bugs.gentoo.org/813228
Package-Manager: Portage-3.0.23, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 kde-plasma/kwin/files/kwin-5.22.5-32bit.patch | 29 +++++++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.22.5.ebuild            |  5 ++++-
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/kde-plasma/kwin/files/kwin-5.22.5-32bit.patch b/kde-plasma/kwin/files/kwin-5.22.5-32bit.patch
new file mode 100644
index 00000000000..7c40b207ca8
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.22.5-32bit.patch
@@ -0,0 +1,29 @@
+From 38e24ecd6416a975db0989c21b70d6a4cc242f35 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Wed, 15 Sep 2021 19:06:23 +0200
+Subject: [PATCH] Fix build with 32-bit
+
+Follow-up to 839710201c389b7f4ed248cb3818e755a37ce977
+
+Tested-by: David Flogeras <dflogeras2@gmail.com>
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ src/plugins/platforms/x11/common/eglonxbackend.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/plugins/platforms/x11/common/eglonxbackend.cpp b/src/plugins/platforms/x11/common/eglonxbackend.cpp
+index d2900c7c3..c8acefe82 100644
+--- a/src/plugins/platforms/x11/common/eglonxbackend.cpp
++++ b/src/plugins/platforms/x11/common/eglonxbackend.cpp
+@@ -214,7 +214,7 @@ EGLSurface EglOnXBackend::createSurface(xcb_window_t window)
+     }
+ 
+     // Window is 64 bits on a 64-bit architecture whereas xcb_window_t is always 32 bits.
+-    unsigned long nativeWindow = window;
++    uintptr_t nativeWindow = window;
+ 
+     EGLSurface surface = EGL_NO_SURFACE;
+     if (havePlatformBase()) {
+-- 
+2.33.0
+

diff --git a/kde-plasma/kwin/kwin-5.22.5.ebuild b/kde-plasma/kwin/kwin-5.22.5.ebuild
index 6bf17ada42c..ed5ad4fac40 100644
--- a/kde-plasma/kwin/kwin-5.22.5.ebuild
+++ b/kde-plasma/kwin/kwin-5.22.5.ebuild
@@ -103,7 +103,10 @@ PDEPEND="
 	>=kde-plasma/kde-cli-tools-${PVCUT}:5
 "
 
-PATCHES=( "${FILESDIR}/${P}-libglvnd-1.3.4.patch" ) # KDE-bug 440372, bug 810511
+PATCHES=(
+	"${FILESDIR}/${P}-libglvnd-1.3.4.patch" # KDE-bug 440372, bug 810511
+	"${FILESDIR}/${P}-32bit.patch" # bug 813228
+)
 
 src_prepare() {
 	ecm_src_prepare


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2020-10-04 16:07 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2020-10-04 16:07 UTC (permalink / raw
  To: gentoo-commits

commit:     804a1b3955488d8b00768d15a2748a97ca615eb6
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  4 11:56:38 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct  4 15:54:08 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=804a1b39

kde-plasma/kwin: Make removal of X11 event filters safe

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=423319
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-5.19.5-safe-removal-of-X11-event-filters.patch | 162 +++++++++++++++++++++
 kde-plasma/kwin/kwin-5.19.5-r1.ebuild              | 113 ++++++++++++++
 2 files changed, 275 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch b/kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch
new file mode 100644
index 00000000000..7eeccf6e8c5
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.19.5-safe-removal-of-X11-event-filters.patch
@@ -0,0 +1,162 @@
+From c5880833d94330d022c4b6fc84c175aadeaf9632 Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Tue, 22 Sep 2020 08:53:17 +0000
+Subject: [PATCH] x11: Make removal of X11 event filters safe
+
+If an X11 event filter has been activated and it unregisters another X11
+event filter, then the window manager may crash because the foreach macro
+in Workspace::workspaceEvent() makes a copy of m_genericEventFilters or
+m_eventFilters and we can call the event() method for an already defunct
+filter.
+
+With this change, X11 event filters can be safely removed and installed
+at any particular moment.
+
+BUG: 423319
+
+
+(cherry picked from commit a433fb08a3a9255802405a17dd4c8270c68fcb25)
+---
+ events.cpp    | 52 +++++++++++++++++++++++++++++++++++++++++----------
+ workspace.cpp | 10 ++++++++++
+ workspace.h   | 17 +++++++++++++++--
+ 3 files changed, 67 insertions(+), 12 deletions(-)
+
+diff --git a/events.cpp b/events.cpp
+index eb3572d13..2e8885d76 100644
+--- a/events.cpp
++++ b/events.cpp
+@@ -165,18 +165,34 @@ QVector<QByteArray> s_xcbEerrors({
+ 
+ void Workspace::registerEventFilter(X11EventFilter *filter)
+ {
+-    if (filter->isGenericEvent())
+-        m_genericEventFilters.append(filter);
+-    else
+-        m_eventFilters.append(filter);
++    if (filter->isGenericEvent()) {
++        m_genericEventFilters.append(new X11EventFilterContainer(filter));
++    } else {
++        m_eventFilters.append(new X11EventFilterContainer(filter));
++    }
++}
++
++static X11EventFilterContainer *takeEventFilter(X11EventFilter *eventFilter,
++                                                QList<QPointer<X11EventFilterContainer>> &list)
++{
++    for (int i = 0; i < list.count(); ++i) {
++        X11EventFilterContainer *container = list.at(i);
++        if (container->filter() == eventFilter) {
++            return list.takeAt(i);
++        }
++    }
++    return nullptr;
+ }
+ 
+ void Workspace::unregisterEventFilter(X11EventFilter *filter)
+ {
+-    if (filter->isGenericEvent())
+-        m_genericEventFilters.removeOne(filter);
+-    else
+-        m_eventFilters.removeOne(filter);
++    X11EventFilterContainer *container = nullptr;
++    if (filter->isGenericEvent()) {
++        container = takeEventFilter(filter, m_genericEventFilters);
++    } else {
++        container = takeEventFilter(filter, m_eventFilters);
++    }
++    delete container;
+ }
+ 
+ 
+@@ -219,13 +235,29 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
+     if (eventType == XCB_GE_GENERIC) {
+         xcb_ge_generic_event_t *ge = reinterpret_cast<xcb_ge_generic_event_t *>(e);
+ 
+-        foreach (X11EventFilter *filter, m_genericEventFilters) {
++        // We need to make a shadow copy of the event filter list because an activated event
++        // filter may mutate it by removing or installing another event filter.
++        const auto eventFilters = m_genericEventFilters;
++
++        for (X11EventFilterContainer *container : eventFilters) {
++            if (!container) {
++                continue;
++            }
++            X11EventFilter *filter = container->filter();
+             if (filter->extension() == ge->extension && filter->genericEventTypes().contains(ge->event_type) && filter->event(e)) {
+                 return true;
+             }
+         }
+     } else {
+-        foreach (X11EventFilter *filter, m_eventFilters) {
++        // We need to make a shadow copy of the event filter list because an activated event
++        // filter may mutate it by removing or installing another event filter.
++        const auto eventFilters = m_eventFilters;
++
++        for (X11EventFilterContainer *container : eventFilters) {
++            if (!container) {
++                continue;
++            }
++            X11EventFilter *filter = container->filter();
+             if (filter->eventTypes().contains(eventType) && filter->event(e)) {
+                 return true;
+             }
+diff --git a/workspace.cpp b/workspace.cpp
+index a87a622e9..fd3634b16 100644
+--- a/workspace.cpp
++++ b/workspace.cpp
+@@ -66,6 +66,16 @@ namespace KWin
+ extern int screen_number;
+ extern bool is_multihead;
+ 
++X11EventFilterContainer::X11EventFilterContainer(X11EventFilter *filter)
++    : m_filter(filter)
++{
++}
++
++X11EventFilter *X11EventFilterContainer::filter() const
++{
++    return m_filter;
++}
++
+ ColorMapper::ColorMapper(QObject *parent)
+     : QObject(parent)
+     , m_default(kwinApp()->x11DefaultScreen()->default_colormap)
+diff --git a/workspace.h b/workspace.h
+index 489d7bae4..61fb215a8 100644
+--- a/workspace.h
++++ b/workspace.h
+@@ -55,6 +55,19 @@ class X11Client;
+ class X11EventFilter;
+ enum class Predicate;
+ 
++class X11EventFilterContainer : public QObject
++{
++    Q_OBJECT
++
++public:
++    explicit X11EventFilterContainer(X11EventFilter *filter);
++
++    X11EventFilter *filter() const;
++
++private:
++    X11EventFilter *m_filter;
++};
++
+ class KWIN_EXPORT Workspace : public QObject
+ {
+     Q_OBJECT
+@@ -654,8 +667,8 @@ private:
+ 
+     QScopedPointer<KillWindow> m_windowKiller;
+ 
+-    QList<X11EventFilter *> m_eventFilters;
+-    QList<X11EventFilter *> m_genericEventFilters;
++    QList<QPointer<X11EventFilterContainer>> m_eventFilters;
++    QList<QPointer<X11EventFilterContainer>> m_genericEventFilters;
+     QScopedPointer<X11EventFilter> m_movingClientFilter;
+     QScopedPointer<X11EventFilter> m_syncAlarmFilter;
+ 
+-- 
+GitLab
+

diff --git a/kde-plasma/kwin/kwin-5.19.5-r1.ebuild b/kde-plasma/kwin/kwin-5.19.5-r1.ebuild
new file mode 100644
index 00000000000..d3058de6442
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.19.5-r1.ebuild
@@ -0,0 +1,113 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ECM_HANDBOOK="optional"
+ECM_TEST="optional"
+KFMIN=5.71.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.14.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Flexible, composited Window Manager for windowing systems on Linux"
+
+LICENSE="GPL-2+"
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="caps gles2-only multimedia"
+
+COMMON_DEPEND="
+	>=dev-libs/libinput-1.14
+	>=dev-libs/wayland-1.2
+	>=dev-qt/qtdbus-${QTMIN}:5
+	>=dev-qt/qtdeclarative-${QTMIN}:5
+	>=dev-qt/qtgui-${QTMIN}:5=[gles2-only=]
+	>=dev-qt/qtscript-${QTMIN}:5
+	>=dev-qt/qtsensors-${QTMIN}:5
+	>=dev-qt/qtwidgets-${QTMIN}:5
+	>=dev-qt/qtx11extras-${QTMIN}:5
+	>=kde-frameworks/kactivities-${KFMIN}:5
+	>=kde-frameworks/kauth-${KFMIN}:5
+	>=kde-frameworks/kcmutils-${KFMIN}:5
+	>=kde-frameworks/kcompletion-${KFMIN}:5
+	>=kde-frameworks/kconfig-${KFMIN}:5
+	>=kde-frameworks/kconfigwidgets-${KFMIN}:5
+	>=kde-frameworks/kcoreaddons-${KFMIN}:5
+	>=kde-frameworks/kcrash-${KFMIN}:5
+	>=kde-frameworks/kdeclarative-${KFMIN}:5
+	>=kde-frameworks/kglobalaccel-${KFMIN}:5=
+	>=kde-frameworks/ki18n-${KFMIN}:5
+	>=kde-frameworks/kiconthemes-${KFMIN}:5
+	>=kde-frameworks/kidletime-${KFMIN}:5=
+	>=kde-frameworks/kio-${KFMIN}:5
+	>=kde-frameworks/knewstuff-${KFMIN}:5
+	>=kde-frameworks/knotifications-${KFMIN}:5
+	>=kde-frameworks/kpackage-${KFMIN}:5
+	>=kde-frameworks/kservice-${KFMIN}:5
+	>=kde-frameworks/ktextwidgets-${KFMIN}:5
+	>=kde-frameworks/kwayland-${KFMIN}:5
+	>=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+	>=kde-frameworks/kwindowsystem-${KFMIN}:5[X]
+	>=kde-frameworks/kxmlgui-${KFMIN}:5
+	>=kde-frameworks/plasma-${KFMIN}:5
+	>=kde-plasma/breeze-${PVCUT}:5
+	>=kde-plasma/kdecoration-${PVCUT}:5
+	>=kde-plasma/kscreenlocker-${PVCUT}:5
+	>=kde-plasma/kwayland-server-${PVCUT}:5
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libepoxy
+	media-libs/mesa[egl,gbm,wayland,X(+)]
+	virtual/libudev:=
+	x11-libs/libICE
+	x11-libs/libSM
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	caps? ( sys-libs/libcap )
+	gles2-only? ( media-libs/mesa[gles2] )
+"
+# TODO: sys-apps/hwdata? not packaged yet; commit 33a1777a, Gentoo-bug 717216
+RDEPEND="${COMMON_DEPEND}
+	>=dev-qt/qtquickcontrols-${QTMIN}:5
+	>=dev-qt/qtquickcontrols2-${QTMIN}:5
+	>=dev-qt/qtvirtualkeyboard-${QTMIN}:5
+	>=kde-frameworks/kirigami-${KFMIN}:5
+	>=kde-frameworks/kitemmodels-${KFMIN}:5[qml]
+	multimedia? ( >=dev-qt/qtmultimedia-${QTMIN}:5[gstreamer,qml] )
+"
+DEPEND="${COMMON_DEPEND}
+	>=dev-qt/designer-${QTMIN}:5
+	>=dev-qt/qtconcurrent-${QTMIN}:5
+	x11-base/xorg-proto
+"
+PDEPEND="
+	>=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+
+RESTRICT+=" test"
+
+PATCHES=(
+	"${FILESDIR}"/${P}-safe-removal-of-X11-event-filters.patch # KDE-Bug 423319
+)
+
+src_prepare() {
+	ecm_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-5.16.80-gstreamer-optional.patch"
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake_use_find_package caps Libcap)
+	)
+
+	ecm_src_configure
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2020-05-16 22:38 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2020-05-16 22:38 UTC (permalink / raw
  To: gentoo-commits

commit:     4410ebee118ca372a9db22dde9cfedcca6299bde
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat May 16 22:04:12 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat May 16 22:38:09 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4410ebee

kde-plasma/kwin: Place lockscreen greeter above other windows

KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=420802
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../kwin-5.18.5-wayland-lockscreen-greeter.patch   | 73 ++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.18.5-r1.ebuild              |  1 +
 2 files changed, 74 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.18.5-wayland-lockscreen-greeter.patch b/kde-plasma/kwin/files/kwin-5.18.5-wayland-lockscreen-greeter.patch
new file mode 100644
index 00000000000..ac4b9d24c8e
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.18.5-wayland-lockscreen-greeter.patch
@@ -0,0 +1,73 @@
+From 6f8b8efb338117ee197092e46b25b489b612257d Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
+Date: Fri, 8 May 2020 11:26:27 +0300
+Subject: [wayland] Place lockscreen greeter above other windows
+
+Summary: BUG: 420802
+
+Reviewers: #kwin, davidedmundson
+
+Reviewed By: #kwin, davidedmundson
+
+Subscribers: apol, kwin
+
+Tags: #kwin
+
+Differential Revision: https://phabricator.kde.org/D29523
+---
+ abstract_client.cpp                  |  2 ++
+ autotests/integration/lockscreen.cpp | 19 +++++++++++++++++++
+ 2 files changed, 21 insertions(+)
+
+diff --git a/abstract_client.cpp b/abstract_client.cpp
+index ca6c422..48918e7 100644
+--- a/abstract_client.cpp
++++ b/abstract_client.cpp
+@@ -275,6 +275,8 @@ Layer AbstractClient::belongsToLayer() const
+     // Since the desktop is also activated, nothing should be in the ActiveLayer, though
+     if (isInternal())
+         return UnmanagedLayer;
++    if (isLockScreen())
++        return UnmanagedLayer;
+     if (isDesktop())
+         return workspace()->showingDesktop() ? AboveLayer : DesktopLayer;
+     if (isSplash())          // no damn annoying splashscreens
+diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp
+index e258540..82cac09 100644
+--- a/autotests/integration/lockscreen.cpp
++++ b/autotests/integration/lockscreen.cpp
+@@ -62,6 +62,7 @@ private Q_SLOTS:
+     void initTestCase();
+     void init();
+     void cleanup();
++    void testStackingOrder();
+     void testPointer();
+     void testPointerButton();
+     void testPointerAxis();
+@@ -223,6 +224,24 @@ void LockScreenTest::cleanup()
+     Test::destroyWaylandConnection();
+ }
+ 
++void LockScreenTest::testStackingOrder()
++{
++    // This test verifies that the lockscreen greeter is placed above other windows.
++
++    QSignalSpy clientAddedSpy(waylandServer(), &WaylandServer::shellClientAdded);
++    QVERIFY(clientAddedSpy.isValid());
++
++    LOCK
++    QVERIFY(clientAddedSpy.wait());
++
++    AbstractClient *client = clientAddedSpy.first().first().value<AbstractClient *>();
++    QVERIFY(client);
++    QVERIFY(client->isLockScreen());
++    QCOMPARE(client->layer(), UnmanagedLayer);
++
++    UNLOCK
++}
++
+ void LockScreenTest::testPointer()
+ {
+     using namespace KWayland::Client;
+-- 
+cgit v1.1

diff --git a/kde-plasma/kwin/kwin-5.18.5-r1.ebuild b/kde-plasma/kwin/kwin-5.18.5-r1.ebuild
index c755f96bbcf..0ba4084e461 100644
--- a/kde-plasma/kwin/kwin-5.18.5-r1.ebuild
+++ b/kde-plasma/kwin/kwin-5.18.5-r1.ebuild
@@ -96,6 +96,7 @@ RESTRICT+=" test"
 PATCHES=(
 	# in Plasma/5.18
 	"${FILESDIR}/${P}-dont-exec-QDialog.patch" # KDE-bug 421053
+	"${FILESDIR}/${P}-wayland-lockscreen-greeter.patch" # KDE-bug 420802
 )
 
 src_prepare() {


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2019-10-26 14:20 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2019-10-26 14:20 UTC (permalink / raw
  To: gentoo-commits

commit:     b7779965fdd4940b1c25224eab98bd89135d98de
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 26 14:19:57 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 26 14:20:19 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7779965

kde-plasma/kwin: Don't use MESA_EGL_NO_X11_HEADERS

Closes: https://bugs.gentoo.org/698546
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...n-5.17.1-dont-use-MESA_EGL_NO_X11_HEADERS.patch | 57 ++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.17.1.ebuild                 |  2 +
 2 files changed, 59 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.17.1-dont-use-MESA_EGL_NO_X11_HEADERS.patch b/kde-plasma/kwin/files/kwin-5.17.1-dont-use-MESA_EGL_NO_X11_HEADERS.patch
new file mode 100644
index 00000000000..a15c8aee153
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.17.1-dont-use-MESA_EGL_NO_X11_HEADERS.patch
@@ -0,0 +1,57 @@
+From 8e176c8b0d97e78e8b33fac3b5acded277bbcf4f Mon Sep 17 00:00:00 2001
+From: Vlad Zahorodnii <vladzzag@gmail.com>
+Date: Mon, 21 Oct 2019 21:20:11 +0300
+Subject: Don't use MESA_EGL_NO_X11_HEADERS
+
+Summary:
+With recent Mesa updates (19.2.1), MESA_EGL_NO_X11_HEADERS doesn't have
+any effect. So, let's include fixx11h.h instead.
+
+Test Plan: I am able to build kwin once again.
+
+Reviewers: #kwin, davidedmundson
+
+Reviewed By: #kwin, davidedmundson
+
+Subscribers: kwin
+
+Tags: #kwin
+
+Differential Revision: https://phabricator.kde.org/D24840
+---
+ plugins/qpa/eglhelpers.h       | 2 +-
+ plugins/qpa/offscreensurface.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/plugins/qpa/eglhelpers.h b/plugins/qpa/eglhelpers.h
+index 1eb7624..30eb56d 100644
+--- a/plugins/qpa/eglhelpers.h
++++ b/plugins/qpa/eglhelpers.h
+@@ -20,9 +20,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ #pragma once
+ 
+-#define MESA_EGL_NO_X11_HEADERS
+ #include <epoxy/egl.h>
+ #include "fixqopengl.h"
++#include <fixx11h.h>
+ 
+ #include <QSurfaceFormat>
+ 
+diff --git a/plugins/qpa/offscreensurface.h b/plugins/qpa/offscreensurface.h
+index 1254981..5b8ce29 100644
+--- a/plugins/qpa/offscreensurface.h
++++ b/plugins/qpa/offscreensurface.h
+@@ -20,9 +20,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ #pragma once
+ 
+-#define MESA_EGL_NO_X11_HEADERS
+ #include <epoxy/egl.h>
+ #include "fixqopengl.h"
++#include <fixx11h.h>
+ 
+ #include <qpa/qplatformoffscreensurface.h>
+ 
+-- 
+cgit v1.1

diff --git a/kde-plasma/kwin/kwin-5.17.1.ebuild b/kde-plasma/kwin/kwin-5.17.1.ebuild
index d3e20b0940d..61b6f0494ca 100644
--- a/kde-plasma/kwin/kwin-5.17.1.ebuild
+++ b/kde-plasma/kwin/kwin-5.17.1.ebuild
@@ -87,6 +87,8 @@ PDEPEND="
 
 RESTRICT+=" test"
 
+PATCHES=( "${FILESDIR}/${P}-dont-use-MESA_EGL_NO_X11_HEADERS.patch" )
+
 src_prepare() {
 	kde5_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-5.16.80-gstreamer-optional.patch"


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2018-11-13 11:32 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2018-11-13 11:32 UTC (permalink / raw
  To: gentoo-commits

commit:     881b0b008ecbd40cf3b264b14ce2429796196ad2
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 13 10:21:08 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Nov 13 11:32:42 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=881b0b00

kde-plasma/kwin: Fix runtime crashes

Backported from 5.14 branch.

Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../files/kwin-5.14.3-resizewindows-crash.patch    |  72 +++++++++++
 .../files/kwin-5.14.3-virtualdesktop-crash.patch   | 137 +++++++++++++++++++++
 kde-plasma/kwin/kwin-5.14.3-r1.ebuild              | 111 +++++++++++++++++
 3 files changed, 320 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.14.3-resizewindows-crash.patch b/kde-plasma/kwin/files/kwin-5.14.3-resizewindows-crash.patch
new file mode 100644
index 00000000000..37963c8395c
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.14.3-resizewindows-crash.patch
@@ -0,0 +1,72 @@
+From 406b70b04e093c13faf763e2d885797ae037d806 Mon Sep 17 00:00:00 2001
+From: Vlad Zagorodniy <vladzzag@gmail.com>
+Date: Mon, 12 Nov 2018 17:45:14 +0200
+Subject: [wayland] Don't crash when resizing windows
+
+Summary:
+If you resize a decorated client by using the resize user action(press
+Alt + F3 > More Actions > Resize), then KWin will crash because it gets
+stuck in an infinite loop (AbstractClient::performMoveResize <->
+ShellClient::setGeometry).
+
+Here's how KWin gets stuck in that loop:
+* when you finish resizing the client, AbstractClient::keyPressEvent
+  will call AbstractClient::finishMoveResize;
+* the first thing that finishMoveResize does is block geometry updates,
+  then it does some clean up (e.g. reset the value of isMoveResize(), etc),
+  updates the geometry of the client and when it's done, it will emit
+  clientFinishUserMoveResized signal;
+* when PointerInputRedirection notices that signal, it will call
+  processDecorationMove on the client, which in its turn will indirectly
+  call AbstractClient::startMoveResize;
+* when it's time to go back to AbstractClient::keyPressEvent, geometry
+  updates are unblocked and if there are any pending geometry updates,
+  then ShellClient::setGeometry will be called;
+* ShellClient::setGeometry will eventually call ShellClient::doSetGeometry;
+* ShellClient::doSetGeometry will call AbstractClient::performMoveResize
+  because AbstractClient::processDecorationMove indirectly called
+  AbstractClient::startMoveResize;
+* AbstractClient::performMoveResize calls ShellClient::setGeometry;
+* (at this point, KWin got stuck in the infinite loop)
+
+This change swaps setMoveResizePointerButtonDown and finishMoveResize,
+so processDecorationMove won't indirectly call startMoveResize.
+
+BUG: 397577
+FIXED-IN: 5.14.4
+
+Reviewers: #kwin, davidedmundson
+
+Reviewed By: #kwin, davidedmundson
+
+Subscribers: kwin
+
+Tags: #kwin
+
+Differential Revision: https://phabricator.kde.org/D16846
+---
+ abstract_client.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/abstract_client.cpp b/abstract_client.cpp
+index b4628f2..ed72b9c 100644
+--- a/abstract_client.cpp
++++ b/abstract_client.cpp
+@@ -1457,13 +1457,13 @@ void AbstractClient::keyPressEvent(uint key_code)
+     case Qt::Key_Space:
+     case Qt::Key_Return:
+     case Qt::Key_Enter:
+-        finishMoveResize(false);
+         setMoveResizePointerButtonDown(false);
++        finishMoveResize(false);
+         updateCursor();
+         break;
+     case Qt::Key_Escape:
+-        finishMoveResize(true);
+         setMoveResizePointerButtonDown(false);
++        finishMoveResize(true);
+         updateCursor();
+         break;
+     default:
+-- 
+cgit v0.11.2

diff --git a/kde-plasma/kwin/files/kwin-5.14.3-virtualdesktop-crash.patch b/kde-plasma/kwin/files/kwin-5.14.3-virtualdesktop-crash.patch
new file mode 100644
index 00000000000..4e480a06be8
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.14.3-virtualdesktop-crash.patch
@@ -0,0 +1,137 @@
+From ad28da84e78c7eb7ff1e608c4819707b2142daea Mon Sep 17 00:00:00 2001
+From: Vlad Zagorodniy <vladzzag@gmail.com>
+Date: Mon, 5 Nov 2018 14:59:42 +0200
+Subject: [effects/slidingpopups] Don't crash when sliding virtual desktops
+
+Summary:
+If you switch virtual desktops while krunner is sliding in, then
+depending on whether your distro strips assert statements away,
+KWin can crash.
+
+The reason why it crashes is the sliding popups effect tries to unref
+deleted windows that it hasn't referenced before (if there is an active
+full screen effect, then popups won't be slided out, which in its turn
+means that we won't reference deleted windows). So, in the end, the
+refcount of those windows can be -1. That triggers an assert statement
+in the destructor of the Deleted class, which checks whether the
+refcount is equal to 0.
+
+Popups are not slided while there is an active full screen effect because
+we don't know what the full screen effect does.
+
+This patch adjusts the sliding popups effect so it stops all active
+animations when user switches virtual desktops or when a full screen
+effect kicks in. We need to do that so the effect won't try to
+unreference windows in postPaintWindow.
+
+Visually, it doesn't look quite nice, but for now that's good enough.
+A proper fix would be more complex: we would need to make sure that
+full screen effects ignore sliding popups (and also maybe docks) and
+perform some input redirection.
+
+BUG: 400170
+FIXED-IN: 5.14.4
+
+Test Plan: I'm not able anymore to reproduce bug 400170.
+
+Reviewers: #kwin, graesslin
+
+Reviewed By: #kwin, graesslin
+
+Subscribers: davidedmundson, graesslin, kwin
+
+Tags: #kwin
+
+Differential Revision: https://phabricator.kde.org/D16731
+---
+ effects/slidingpopups/slidingpopups.cpp | 22 ++++++++++++++++++++++
+ effects/slidingpopups/slidingpopups.h   |  6 +++---
+ 2 files changed, 25 insertions(+), 3 deletions(-)
+
+diff --git a/effects/slidingpopups/slidingpopups.cpp b/effects/slidingpopups/slidingpopups.cpp
+index a104a5c..066b2a3 100644
+--- a/effects/slidingpopups/slidingpopups.cpp
++++ b/effects/slidingpopups/slidingpopups.cpp
+@@ -3,6 +3,7 @@
+  This file is part of the KDE project.
+ 
+ Copyright (C) 2009 Marco Martin notmart@gmail.com
++Copyright (C) 2018 Vlad Zagorodniy <vladzzag@gmail.com>
+ 
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -53,6 +54,11 @@ SlidingPopupsEffect::SlidingPopupsEffect()
+             m_atom = effects->announceSupportProperty(QByteArrayLiteral("_KDE_SLIDE"), this);
+         }
+     );
++    connect(effects, qOverload<int, int, EffectWindow *>(&EffectsHandler::desktopChanged),
++            this, &SlidingPopupsEffect::stopAnimations);
++    connect(effects, &EffectsHandler::activeFullScreenEffectChanged,
++            this, &SlidingPopupsEffect::stopAnimations);
++
+     reconfigure(ReconfigureAll);
+ }
+ 
+@@ -434,6 +440,22 @@ void SlidingPopupsEffect::slideOut(EffectWindow *w)
+     w->addRepaintFull();
+ }
+ 
++void SlidingPopupsEffect::stopAnimations()
++{
++    for (auto it = m_animations.constBegin(); it != m_animations.constEnd(); ++it) {
++        EffectWindow *w = it.key();
++
++        if (w->isDeleted()) {
++            w->unrefWindow();
++        } else {
++            w->setData(WindowForceBackgroundContrastRole, QVariant());
++            w->setData(WindowForceBlurRole, QVariant());
++        }
++    }
++
++    m_animations.clear();
++}
++
+ bool SlidingPopupsEffect::isActive() const
+ {
+     return !m_animations.isEmpty();
+diff --git a/effects/slidingpopups/slidingpopups.h b/effects/slidingpopups/slidingpopups.h
+index 821640a..32e8fb5 100644
+--- a/effects/slidingpopups/slidingpopups.h
++++ b/effects/slidingpopups/slidingpopups.h
+@@ -3,6 +3,7 @@
+  This file is part of the KDE project.
+ 
+ Copyright (C) 2009 Marco Martin notmart@gmail.com
++Copyright (C) 2018 Vlad Zagorodniy <vladzzag@gmail.com>
+ 
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+@@ -49,8 +50,6 @@ public:
+ 
+     static bool supported();
+ 
+-    // TODO react also on virtual desktop changes
+-
+     int slideInDuration() const;
+     int slideOutDuration() const;
+ 
+@@ -62,6 +61,7 @@ private Q_SLOTS:
+ 
+     void slideIn(EffectWindow *w);
+     void slideOut(EffectWindow *w);
++    void stopAnimations();
+ 
+ private:
+     void setupAnimData(EffectWindow *w);
+@@ -81,7 +81,7 @@ private:
+         AnimationKind kind;
+         TimeLine timeLine;
+     };
+-    QHash<const EffectWindow*, Animation> m_animations;
++    QHash<EffectWindow *, Animation> m_animations;
+ 
+     enum class Location {
+         Left,
+-- 
+cgit v0.11.2

diff --git a/kde-plasma/kwin/kwin-5.14.3-r1.ebuild b/kde-plasma/kwin/kwin-5.14.3-r1.ebuild
new file mode 100644
index 00000000000..a2ab760c9be
--- /dev/null
+++ b/kde-plasma/kwin/kwin-5.14.3-r1.ebuild
@@ -0,0 +1,111 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+KDE_HANDBOOK="optional"
+KDE_TEST="optional"
+VIRTUALX_REQUIRED="test"
+inherit kde5
+
+DESCRIPTION="KDE window manager"
+LICENSE="GPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="caps gles2 multimedia"
+
+COMMON_DEPEND="
+	$(add_frameworks_dep kactivities)
+	$(add_frameworks_dep kauth)
+	$(add_frameworks_dep kcmutils)
+	$(add_frameworks_dep kcompletion)
+	$(add_frameworks_dep kconfig)
+	$(add_frameworks_dep kconfigwidgets)
+	$(add_frameworks_dep kcoreaddons)
+	$(add_frameworks_dep kcrash)
+	$(add_frameworks_dep kdeclarative)
+	$(add_frameworks_dep kglobalaccel '' '' '5=')
+	$(add_frameworks_dep ki18n)
+	$(add_frameworks_dep kiconthemes)
+	$(add_frameworks_dep kidletime '' '' '5=')
+	$(add_frameworks_dep kinit)
+	$(add_frameworks_dep kio)
+	$(add_frameworks_dep knewstuff)
+	$(add_frameworks_dep knotifications)
+	$(add_frameworks_dep kpackage)
+	$(add_frameworks_dep kservice)
+	$(add_frameworks_dep ktextwidgets)
+	$(add_frameworks_dep kwayland)
+	$(add_frameworks_dep kwidgetsaddons)
+	$(add_frameworks_dep kwindowsystem X)
+	$(add_frameworks_dep kxmlgui)
+	$(add_frameworks_dep plasma)
+	$(add_plasma_dep breeze)
+	$(add_plasma_dep kdecoration)
+	$(add_plasma_dep kscreenlocker)
+	$(add_qt_dep qtdbus)
+	$(add_qt_dep qtdeclarative)
+	$(add_qt_dep qtgui 'gles2=' '' '5=')
+	$(add_qt_dep qtscript)
+	$(add_qt_dep qtsensors)
+	$(add_qt_dep qtwidgets)
+	$(add_qt_dep qtx11extras)
+	>=dev-libs/libinput-1.9
+	>=dev-libs/wayland-1.2
+	media-libs/fontconfig
+	media-libs/freetype
+	media-libs/libepoxy
+	media-libs/mesa[egl,gbm,gles2?,wayland]
+	virtual/libudev:=
+	x11-libs/libICE
+	x11-libs/libSM
+	x11-libs/libX11
+	x11-libs/libXi
+	x11-libs/libdrm
+	>=x11-libs/libxcb-1.10
+	>=x11-libs/libxkbcommon-0.7.0
+	x11-libs/xcb-util-cursor
+	x11-libs/xcb-util-image
+	x11-libs/xcb-util-keysyms
+	x11-libs/xcb-util-wm
+	caps? ( sys-libs/libcap )
+"
+RDEPEND="${COMMON_DEPEND}
+	$(add_qt_dep qtquickcontrols)
+	$(add_qt_dep qtquickcontrols2)
+	$(add_qt_dep qtvirtualkeyboard)
+	multimedia? ( $(add_qt_dep qtmultimedia 'gstreamer,qml') )
+	!kde-plasma/kwin:4
+	!kde-plasma/systemsettings:4
+"
+DEPEND="${COMMON_DEPEND}
+	$(add_qt_dep designer)
+	$(add_qt_dep qtconcurrent)
+	x11-base/xorg-proto
+"
+PDEPEND="
+	$(add_plasma_dep kde-cli-tools)
+"
+
+RESTRICT+=" test"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.14.3-virtualdesktop-crash.patch"
+	"${FILESDIR}/${PN}-5.14.3-resizewindows-crash.patch"
+)
+
+src_prepare() {
+	kde5_src_prepare
+	use multimedia || eapply "${FILESDIR}/${PN}-gstreamer-optional.patch"
+
+	# Access violations, bug #640432
+	sed -e "s/^ecm_find_qmlmodule.*QtMultimedia/#&/" \
+		-i CMakeLists.txt || die
+}
+
+src_configure() {
+	local mycmakeargs=(
+		$(cmake-utils_use_find_package caps Libcap)
+	)
+
+	kde5_src_configure
+}


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2018-01-15  0:17 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2018-01-15  0:17 UTC (permalink / raw
  To: gentoo-commits

commit:     7a032cfe2cf568e79295de64bce575f9b3cd8811
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 15 00:16:37 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Jan 15 00:17:32 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a032cfe

kde-plasma/kwin: Fix build w/ cmake-3.10

Reported-by: Mike Lothian <mike <AT> fireburn.co.uk>
Closes: https://bugs.gentoo.org/644604
Package-Manager: Portage-2.3.19, Repoman-2.3.6

 kde-plasma/kwin/files/kwin-5.11.5-cmake-3.10.patch | 49 ++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.11.5.ebuild                 |  5 ++-
 2 files changed, 53 insertions(+), 1 deletion(-)

diff --git a/kde-plasma/kwin/files/kwin-5.11.5-cmake-3.10.patch b/kde-plasma/kwin/files/kwin-5.11.5-cmake-3.10.patch
new file mode 100644
index 00000000000..1b7c6145578
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.11.5-cmake-3.10.patch
@@ -0,0 +1,49 @@
+From cd544890ced4192d07467c89e23adbb62d8cea5c Mon Sep 17 00:00:00 2001
+From: Milian Wolff <mail@milianw.de>
+Date: Mon, 18 Dec 2017 11:40:35 +0100
+Subject: Fix build with CMake 3.10
+
+Looks like a classic false-positive, but this makes the compile
+pass for me without making the code harder to read:
+
+AutoMoc error
+-------------
+  "/ssd/milian/projects/kf5/src/kde/workspace/kwin/kcmkwin/kwinscripts/main.cpp"
+The file contains a K_PLUGIN_FACTORY macro, but does not include "main.moc"!
+Consider to
+ - add #include "main.moc"
+ - enable SKIP_AUTOMOC for this file
+
+So we just add the include and then get rid of the duplicate
+definition of the plugin factory and the problem is resolved.
+---
+ kcmkwin/kwinscripts/main.cpp   | 2 ++
+ kcmkwin/kwinscripts/module.cpp | 2 --
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kcmkwin/kwinscripts/main.cpp b/kcmkwin/kwinscripts/main.cpp
+index f5ee04b..baa5175 100644
+--- a/kcmkwin/kwinscripts/main.cpp
++++ b/kcmkwin/kwinscripts/main.cpp
+@@ -22,3 +22,5 @@
+ 
+ K_PLUGIN_FACTORY(KcmKWinScriptsFactory,
+                  registerPlugin<Module>("kwin-scripts");)
++
++#include "main.moc"
+diff --git a/kcmkwin/kwinscripts/module.cpp b/kcmkwin/kwinscripts/module.cpp
+index a0d698e..ccf7d41 100644
+--- a/kcmkwin/kwinscripts/module.cpp
++++ b/kcmkwin/kwinscripts/module.cpp
+@@ -40,8 +40,6 @@
+ 
+ #include "version.h"
+ 
+-K_PLUGIN_FACTORY_DECLARATION(KcmKWinScriptsFactory)
+-
+ Module::Module(QWidget *parent, const QVariantList &args) :
+     KCModule(parent, args),
+     ui(new Ui::Module),
+-- 
+cgit v0.11.2
+

diff --git a/kde-plasma/kwin/kwin-5.11.5.ebuild b/kde-plasma/kwin/kwin-5.11.5.ebuild
index 1a238668058..3cffda51d8d 100644
--- a/kde-plasma/kwin/kwin-5.11.5.ebuild
+++ b/kde-plasma/kwin/kwin-5.11.5.ebuild
@@ -84,7 +84,10 @@ DEPEND="${COMMON_DEPEND}
 
 RESTRICT+=" test"
 
-PATCHES=( "${FILESDIR}/${PN}-5.10.95-test-optional.patch" )
+PATCHES=(
+	"${FILESDIR}/${PN}-5.10.95-test-optional.patch"
+	"${FILESDIR}/${PN}-5.11.5-cmake-3.10.patch"
+)
 
 src_prepare() {
 	kde5_src_prepare


^ permalink raw reply related	[flat|nested] 21+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/
@ 2017-06-10 16:12 Andreas Sturmlechner
  0 siblings, 0 replies; 21+ messages in thread
From: Andreas Sturmlechner @ 2017-06-10 16:12 UTC (permalink / raw
  To: gentoo-commits

commit:     35c1419142a37a2be44c1a66d91f57b9b84382b8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 10 16:10:39 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jun 10 16:10:39 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c14191

kde-plasma/kwin: Fix build with future glibc

Gentoo-bug: 603138

Package-Manager: Portage-2.3.5, Repoman-2.3.1

 .../kwin/files/kwin-5.8.7-glibc-sysmacros.patch    | 38 ++++++++++++++++++++++
 kde-plasma/kwin/kwin-5.10.1.ebuild                 |  2 ++
 kde-plasma/kwin/kwin-5.8.7.ebuild                  |  2 ++
 kde-plasma/kwin/kwin-5.9.5.ebuild                  |  2 ++
 4 files changed, 44 insertions(+)

diff --git a/kde-plasma/kwin/files/kwin-5.8.7-glibc-sysmacros.patch b/kde-plasma/kwin/files/kwin-5.8.7-glibc-sysmacros.patch
new file mode 100644
index 00000000000..61c07feaee3
--- /dev/null
+++ b/kde-plasma/kwin/files/kwin-5.8.7-glibc-sysmacros.patch
@@ -0,0 +1,38 @@
+commit 8efef12eeb377e9087551e333d65631968c80e5f
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date:   Sat Jun 10 17:00:25 2017 +0200
+
+    Fix build with future glibc (major/minor macros), BSD compatible
+    
+    Summary:
+    Also adding sys/types.h which is not implicitly included from all over.
+    
+    Thanks-to: [ade] in #kde-devel
+    
+    See also:
+    https://sourceware.org/ml/libc-alpha/2015-11/msg00452.html
+    https://git.reviewboard.kde.org/r/127662/
+    
+    Reviewers: #plasma
+    
+    Subscribers: plasma-devel, kwin, #kwin, adridg
+    
+    Tags: #kwin
+    
+    Differential Revision: https://phabricator.kde.org/D6175
+
+diff --git a/logind.cpp b/logind.cpp
+index fee0f2ff4..bb84af4f9 100644
+--- a/logind.cpp
++++ b/logind.cpp
+@@ -29,6 +29,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ #include <QDBusMetaType>
+ 
+ #include <sys/stat.h>
++#include <sys/types.h>
++#ifndef major
++#include <sys/sysmacros.h>
++#endif
+ #include <unistd.h>
+ #include "utils.h"
+ 

diff --git a/kde-plasma/kwin/kwin-5.10.1.ebuild b/kde-plasma/kwin/kwin-5.10.1.ebuild
index 3566ab51d84..30a4b71b6a2 100644
--- a/kde-plasma/kwin/kwin-5.10.1.ebuild
+++ b/kde-plasma/kwin/kwin-5.10.1.ebuild
@@ -87,6 +87,8 @@ DEPEND="${COMMON_DEPEND}
 
 RESTRICT+=" test"
 
+PATCHES=( "${FILESDIR}/${PN}-5.8.7-glibc-sysmacros.patch" )
+
 src_prepare() {
 	kde5_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-gstreamer-optional.patch"

diff --git a/kde-plasma/kwin/kwin-5.8.7.ebuild b/kde-plasma/kwin/kwin-5.8.7.ebuild
index bfbefa0351d..aba9f3344de 100644
--- a/kde-plasma/kwin/kwin-5.8.7.ebuild
+++ b/kde-plasma/kwin/kwin-5.8.7.ebuild
@@ -89,6 +89,8 @@ DEPEND="${COMMON_DEPEND}
 
 RESTRICT+=" test"
 
+PATCHES=( "${FILESDIR}/${P}-glibc-sysmacros.patch" )
+
 src_prepare() {
 	kde5_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-gstreamer-optional.patch"

diff --git a/kde-plasma/kwin/kwin-5.9.5.ebuild b/kde-plasma/kwin/kwin-5.9.5.ebuild
index 77c9c31ad8b..222df722d24 100644
--- a/kde-plasma/kwin/kwin-5.9.5.ebuild
+++ b/kde-plasma/kwin/kwin-5.9.5.ebuild
@@ -88,6 +88,8 @@ DEPEND="${COMMON_DEPEND}
 
 RESTRICT+=" test"
 
+PATCHES=( "${FILESDIR}/${PN}-5.8.7-glibc-sysmacros.patch" )
+
 src_prepare() {
 	kde5_src_prepare
 	use multimedia || eapply "${FILESDIR}/${PN}-gstreamer-optional.patch"


^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-08-11  6:54 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-16 22:38 [gentoo-commits] repo/gentoo:master commit in: kde-plasma/kwin/files/, kde-plasma/kwin/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2024-08-11  6:54 Andreas Sturmlechner
2024-03-08 20:44 Andreas Sturmlechner
2023-11-11  8:37 Andreas Sturmlechner
2023-09-20 13:15 Andreas Sturmlechner
2023-06-27 11:25 Andreas Sturmlechner
2023-05-10 11:37 Andreas Sturmlechner
2022-10-28 16:07 Andreas Sturmlechner
2022-05-25 21:13 Andreas Sturmlechner
2022-05-17 19:02 Andreas Sturmlechner
2022-04-18 14:17 Andreas Sturmlechner
2022-02-06 21:17 Andreas Sturmlechner
2021-12-15 11:28 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
2021-09-15 17:42 Andreas Sturmlechner
2020-10-04 16:07 Andreas Sturmlechner
2020-05-16 22:38 Andreas Sturmlechner
2019-10-26 14:20 Andreas Sturmlechner
2018-11-13 11:32 Andreas Sturmlechner
2018-01-15  0:17 Andreas Sturmlechner
2017-06-10 16:12 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox