Kde/kwin: add kwin pr 6844

This commit is contained in:
Toast 2024-12-19 00:47:20 +01:00
parent 0c754f1930
commit ba2d6eb02a
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,41 @@
diff --git a/src/plugins/private/expolayout.cpp b/src/plugins/private/expolayout.cpp
index 52e8bd6616..d4f2a41acc 100644
--- a/src/plugins/private/expolayout.cpp
+++ b/src/plugins/private/expolayout.cpp
@@ -7,6 +7,7 @@
#include "expolayout.h"
+#include <QQmlProperty>
#include <cmath>
#include <deque>
#include <tuple>
@@ -41,6 +42,12 @@ ExpoCell::~ExpoCell()
void ExpoCell::componentComplete()
{
QQuickItem::componentComplete();
+
+ QQmlProperty xProperty(this, "Kirigami.ScenePosition.x", qmlContext(this));
+ xProperty.connectNotifySignal(this, SLOT(updateContentItemGeometry()));
+ QQmlProperty yProperty(this, "Kirigami.ScenePosition.y", qmlContext(this));
+ yProperty.connectNotifySignal(this, SLOT(updateContentItemGeometry()));
+
updateContentItemGeometry();
}
diff --git a/src/plugins/private/expolayout.h b/src/plugins/private/expolayout.h
index 0d4f9d5cde..d980c2aabb 100644
--- a/src/plugins/private/expolayout.h
+++ b/src/plugins/private/expolayout.h
@@ -264,8 +264,10 @@ Q_SIGNALS:
void persistentKeyChanged();
void bottomMarginChanged();
-private:
+private Q_SLOTS:
void updateContentItemGeometry();
+
+private:
void updateLayout();
QString m_persistentKey;

View file

@ -10,6 +10,7 @@
++ [
../patches/kwin-pr6406.patch
../patches/kwin-pr6878.patch
../patches/kwin-pr6844.patch
];
};
}