[arch-commits] Commit in deepin-kwin/repos (6 files)
Antonio Rojas
arojas at archlinux.org
Thu Nov 19 20:59:26 UTC 2020
Date: Thursday, November 19, 2020 @ 20:59:26
Author: arojas
Revision: 757757
archrelease: copy trunk to community-staging-x86_64
Added:
deepin-kwin/repos/community-staging-x86_64/
deepin-kwin/repos/community-staging-x86_64/PKGBUILD
(from rev 757756, deepin-kwin/trunk/PKGBUILD)
deepin-kwin/repos/community-staging-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch
(from rev 757756, deepin-kwin/trunk/deepin-kwin-added-functions-from-their-forked-kwin.patch)
deepin-kwin/repos/community-staging-x86_64/deepin-kwin-qt5.15.patch
(from rev 757756, deepin-kwin/trunk/deepin-kwin-qt5.15.patch)
deepin-kwin/repos/community-staging-x86_64/deepin-kwin-unload-blur.patch
(from rev 757756, deepin-kwin/trunk/deepin-kwin-unload-blur.patch)
deepin-kwin/repos/community-staging-x86_64/kwin-5.19.patch
(from rev 757756, deepin-kwin/trunk/kwin-5.19.patch)
----------------------------------------------------------+
PKGBUILD | 51 +++++
deepin-kwin-added-functions-from-their-forked-kwin.patch | 129 +++++++++++++
deepin-kwin-qt5.15.patch | 24 ++
deepin-kwin-unload-blur.patch | 66 ++++++
kwin-5.19.patch | 124 ++++++++++++
5 files changed, 394 insertions(+)
Copied: deepin-kwin/repos/community-staging-x86_64/PKGBUILD (from rev 757756, deepin-kwin/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2020-11-19 20:59:26 UTC (rev 757757)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Josip Ponjavic <josipponjavic at gmail dot com>
+# Contributor: Xu Fasheng <fasheng.xu[AT]gmail.com>
+
+pkgname=deepin-kwin
+pkgver=5.2.0.2
+pkgrel=4
+pkgdesc='KWin configures on DDE'
+arch=('x86_64')
+url="https://github.com/linuxdeepin/dde-kwin"
+license=('GPL3')
+depends=('deepin-qt5integration' 'deepin-wallpapers' 'kwin')
+makedepends=('extra-cmake-modules' 'expac' 'ninja' 'qt5-tools')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-kwin/archive/$pkgver.tar.gz"
+ $pkgname-tabbox-chameleon-rename.patch::https://github.com/linuxdeepin/dde-kwin/pull/106.patch
+ $pkgname-build-fix.patch::https://github.com/linuxdeepin/dde-kwin/pull/109.patch
+ $pkgname-unload-blur.patch
+ $pkgname-added-functions-from-their-forked-kwin.patch
+ deepin-kwin-qt5.15.patch
+ kwin-5.19.patch)
+sha512sums=('1d8243a4140f87f73b8bbf9a8b448a8d4bde9653d214382515493c306f47f2866a92b0fed049b26313a96898b18bd0e05a3e1c17eca53a68e82e7669a535ef7b'
+ '7ac1a577868b73314274d336287334acc5bf4ac06dde046c93e4c2d3f68a112389c8b0644d1cbc3fde5ba1c01f368676f4f34b4a1b7b6c97a5b73d66507d134d'
+ '3e10241050959b51bdd6bf752253af61a2b5899c3df5d84716bd1688d9292ff65d2b7d3aea8f61e896081a9bee013cb3f4c2f42f7915038f7f476120a44cf029'
+ '9c5bf86510d0fbba36e71997f55eda1b197b26af7eeb0adb9e06e7e3cc86b32c00cd23dfca872f4043f76a1d9435f916aae73536f10c7b3fe7e79a6e74a309d2'
+ '8ac66a3a9a0d6f53c776c5b3c98830cfba6df562aa772f03a20737cbc04ec139513eee484ed42fa96188b26135918540b652ad653da9758162319568d03d185c'
+ '8fe73f833e2b24fe9bbaf12220a9d41d5e4808c833d7e7878635a85429e6c474ae79189d75d1d4e77c78bafbe2855db37ded24c85768f9a9415a00a0456c9dce'
+ 'a33c21cae1d271b9e93df0b2987fb8c3956018406c88cc6a847b7f0e228316020b45f0961b67bf52b70b36da7840920bf729cc552f5ea765110766806756f348')
+
+prepare() {
+ cd dde-kwin-$pkgver
+ sed -i 's|/usr/share/backgrounds/default_background.jpg|/usr/share/backgrounds/deepin/desktop.jpg|' plugins/kwineffects/multitasking/background.cpp
+ patch -R -p1 -i ../$pkgname-added-functions-from-their-forked-kwin.patch
+ patch -p1 -i ../$pkgname-tabbox-chameleon-rename.patch
+ patch -p1 -i ../$pkgname-build-fix.patch
+ patch -p1 -i ../$pkgname-unload-blur.patch
+ patch -p1 -i ../deepin-kwin-qt5.15.patch # Fix build with Qt 5.15
+ patch -p1 -i ../kwin-5.19.patch
+}
+
+build() {
+ cd dde-kwin-$pkgver
+ cmake . -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DKWIN_VERSION=$(expac %v kwin | cut -d - -f 1)
+ ninja
+}
+
+package() {
+ cd dde-kwin-$pkgver
+ DESTDIR="$pkgdir" ninja install
+
+ chmod +x "$pkgdir"/usr/bin/kwin_no_scale
+}
Copied: deepin-kwin/repos/community-staging-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch (from rev 757756, deepin-kwin/trunk/deepin-kwin-added-functions-from-their-forked-kwin.patch)
===================================================================
--- community-staging-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch (rev 0)
+++ community-staging-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch 2020-11-19 20:59:26 UTC (rev 757757)
@@ -0,0 +1,129 @@
+From 23a92e4839509ee3ef8886618ce1ee4cfbec3427 Mon Sep 17 00:00:00 2001
+From: wangxinbo <wangxinbo at uniontech.com>
+Date: Tue, 11 Aug 2020 14:19:26 +0800
+Subject: [PATCH] feat: add touch pad double click with three fingers to move
+ active client
+
+pms task id 30501
+---
+ deepin-wm-dbus/com.deepin.wm.xml.in | 6 ++++++
+ deepin-wm-dbus/deepinwmfaker.cpp | 10 ++++++++++
+ deepin-wm-dbus/deepinwmfaker.h | 3 +++
+ plugins/platforms/lib/kwinutils.cpp | 18 ++++++++++++++++++
+ plugins/platforms/lib/kwinutils.h | 2 ++
+ .../plugin/org.kde.kwin.KWinUtils.xml | 6 ++++++
+ 6 files changed, 45 insertions(+)
+
+diff --git a/deepin-wm-dbus/com.deepin.wm.xml.in b/deepin-wm-dbus/com.deepin.wm.xml.in
+index 8a45365..ff4629a 100644
+--- a/deepin-wm-dbus/com.deepin.wm.xml.in
++++ b/deepin-wm-dbus/com.deepin.wm.xml.in
+@@ -184,4 +184,10 @@
+ <method name="GetCurrentDesktopStatus">
+ <arg type="b" name="isDesktop" direction="out"/>
+ </method>
++ <method name="TouchToMove">
++ <arg type="i" name="x" direction="in"/>
++ <arg type="i" name="y" direction="in"/>
++ </method>
++ <method name="ClearMoveStatus">
++ </method>
+ </interface>
+diff --git a/deepin-wm-dbus/deepinwmfaker.cpp b/deepin-wm-dbus/deepinwmfaker.cpp
+index 453280d..2f3f48a 100644
+--- a/deepin-wm-dbus/deepinwmfaker.cpp
++++ b/deepin-wm-dbus/deepinwmfaker.cpp
+@@ -681,6 +681,16 @@ void DeepinWMFaker::BeginToMoveActiveWindow()
+ m_kwinUtilsInter->WindowMove();
+ }
+
++void DeepinWMFaker::TouchToMove(int x, int y)
++{
++ m_kwinUtilsInter->TouchPadToMoveWindow(x,y);
++}
++
++void DeepinWMFaker::ClearMoveStatus()
++{
++ m_kwinUtilsInter->EndTouchPadToMoveWindow();
++}
++
+ void DeepinWMFaker::SwitchApplication(bool backward)
+ {
+ if (!m_kwinUtilsInter->isValid()) {
+diff --git a/deepin-wm-dbus/deepinwmfaker.h b/deepin-wm-dbus/deepinwmfaker.h
+index 9ee73ab..ae6374a 100644
+--- a/deepin-wm-dbus/deepinwmfaker.h
++++ b/deepin-wm-dbus/deepinwmfaker.h
+@@ -136,6 +136,8 @@ public Q_SLOTS:
+ bool GetIsShowDesktop();
+ void SetShowDesktop(bool isShowDesktop);
+
++ void TouchToMove(int x, int y);
++ void ClearMoveStatus();
+ Q_SIGNALS:
+ void WorkspaceBackgroundChanged(int index, const QString &newUri);
+ void WorkspaceBackgroundChangedForMonitor(int index, const QString &strMonitorName, const QString &newUri);
+diff --git a/plugins/platforms/lib/kwinutils.cpp b/plugins/platforms/lib/kwinutils.cpp
+index 8bf9e27..0be9682 100644
+--- a/plugins/platforms/lib/kwinutils.cpp
++++ b/plugins/platforms/lib/kwinutils.cpp
+@@ -88,6 +88,8 @@ public Q_SLOTS:
+ void slotWindowMove();
+ void slotWindowMaximize();
+ bool compositing() const;
++ void slotTouchPadTomoveWindow(int x, int y);
++ void slotEndTouchPadToMoveWindow();
+
+ #if !defined(KWIN_VERSION) || KWIN_VERSION < KWIN_VERSION_CHECK(5, 10, 95, 0)
+ // kwin < 5.10.95
+@@ -1082,6 +1084,22 @@ void KWinUtils::WindowMove()
+ }
+ }
+
++void KWinUtils::TouchPadToMoveWindow(int x, int y)
++{
++ KWin::Workspace *ws = static_cast<KWin::Workspace *>(workspace());
++ if (ws) {
++ ws->slotTouchPadTomoveWindow(x,y);
++ }
++}
++
++void KWinUtils::EndTouchPadToMoveWindow()
++{
++ KWin::Workspace *ws = static_cast<KWin::Workspace *>(workspace());
++ if (ws) {
++ ws->slotEndTouchPadToMoveWindow();
++ }
++}
++
+ void KWinUtils::WindowMaximize()
+ {
+ KWin::Workspace *ws = static_cast<KWin::Workspace *>(workspace());
+diff --git a/plugins/platforms/lib/kwinutils.h b/plugins/platforms/lib/kwinutils.h
+index 57edb86..2c75875 100644
+--- a/plugins/platforms/lib/kwinutils.h
++++ b/plugins/platforms/lib/kwinutils.h
+@@ -156,6 +156,8 @@ public Q_SLOTS:
+ void ShowWindowsView();
+ void ResumeCompositor(int type);
+ void SuspendCompositor(int type);
++ void TouchPadToMoveWindow(int x, int y);
++ void EndTouchPadToMoveWindow();
+
+ Q_SIGNALS:
+ void initialized();
+diff --git a/plugins/platforms/plugin/org.kde.kwin.KWinUtils.xml b/plugins/platforms/plugin/org.kde.kwin.KWinUtils.xml
+index aa61b6c..5854ed0 100644
+--- a/plugins/platforms/plugin/org.kde.kwin.KWinUtils.xml
++++ b/plugins/platforms/plugin/org.kde.kwin.KWinUtils.xml
+@@ -22,4 +22,10 @@
+ <method name="SuspendCompositor">
+ <arg type="i" name="type" direction="in"/>
+ </method>
++ <method name="TouchPadToMoveWindow">
++ <arg type="i" name="x" direction="in"/>
++ <arg type="i" name="y" direction="in"/>
++ </method>
++ <method name="EndTouchPadToMoveWindow">
++ </method>
+ </interface>
Copied: deepin-kwin/repos/community-staging-x86_64/deepin-kwin-qt5.15.patch (from rev 757756, deepin-kwin/trunk/deepin-kwin-qt5.15.patch)
===================================================================
--- community-staging-x86_64/deepin-kwin-qt5.15.patch (rev 0)
+++ community-staging-x86_64/deepin-kwin-qt5.15.patch 2020-11-19 20:59:26 UTC (rev 757757)
@@ -0,0 +1,24 @@
+diff --git a/plugins/kdecoration/chameleon.h b/plugins/kdecoration/chameleon.h
+index 3d164ca..a716a7a 100644
+--- a/plugins/kdecoration/chameleon.h
++++ b/plugins/kdecoration/chameleon.h
+@@ -32,6 +32,7 @@
+ #include <QDir>
+ #include <QSettings>
+ #include <QScreen>
++#include <QPainterPath>
+
+ class Settings;
+ class ChameleonWindowTheme;
+diff --git a/plugins/kwineffects/scissor-window/scissorwindow.cpp b/plugins/kwineffects/scissor-window/scissorwindow.cpp
+index eb17483..faa898e 100644
+--- a/plugins/kwineffects/scissor-window/scissorwindow.cpp
++++ b/plugins/kwineffects/scissor-window/scissorwindow.cpp
+@@ -28,6 +28,7 @@
+ #include <kwingltexture.h>
+
+ #include <QPainter>
++#include <QPainterPath>
+ #include <QExplicitlySharedDataPointer>
+ #include <QSignalBlocker>
+
Copied: deepin-kwin/repos/community-staging-x86_64/deepin-kwin-unload-blur.patch (from rev 757756, deepin-kwin/trunk/deepin-kwin-unload-blur.patch)
===================================================================
--- community-staging-x86_64/deepin-kwin-unload-blur.patch (rev 0)
+++ community-staging-x86_64/deepin-kwin-unload-blur.patch 2020-11-19 20:59:26 UTC (rev 757757)
@@ -0,0 +1,66 @@
+From 2a1753972eac4345e864d6f4ec795a9fda48fda1 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars at archlinux.org>
+Date: Sun, 17 May 2020 23:46:26 +0800
+Subject: [PATCH] fix: make sure kwin's builtin blur is unloaded
+
+---
+ plugins/kwineffects/blur/blur.cpp | 24 ++++++++++++++----------
+ plugins/kwineffects/blur/blur.h | 1 +
+ 2 files changed, 15 insertions(+), 10 deletions(-)
+
+diff --git a/plugins/kwineffects/blur/blur.cpp b/plugins/kwineffects/blur/blur.cpp
+index b5cae9e..6f38429 100644
+--- a/plugins/kwineffects/blur/blur.cpp
++++ b/plugins/kwineffects/blur/blur.cpp
+@@ -41,16 +41,7 @@ static const QByteArray s_blurAtomName = QByteArrayLiteral("_KDE_NET_WM_BLUR_BEH
+
+ BlurEffect::BlurEffect(QObject *, const QVariantList &)
+ {
+- // 禁用kwin自己的模糊特效,防止两个特效之间出现冲突
+- {
+- bool blur_loaded = false;
+- QMetaObject::invokeMethod(effects, "isEffectLoaded", Qt::DirectConnection, Q_RETURN_ARG(bool, blur_loaded), Q_ARG(QString, "blur"));
+-
+- if (blur_loaded) {
+- // qWarning() << "will try unload builtIn blur effect of kwin";
+- QMetaObject::invokeMethod(effects, "unloadEffect", Qt::DirectConnection, Q_ARG(QString, "blur"));
+- }
+- }
++ unloadBuiltinBlur();
+
+ m_shader = new BlurShader(this);
+
+@@ -687,8 +678,21 @@ void BlurEffect::generateNoiseTexture()
+ m_noiseTexture.setWrapMode(GL_REPEAT);
+ }
+
++void BlurEffect::unloadBuiltinBlur()
++// 禁用kwin自己的模糊特效,防止两个特效之间出现冲突
++{
++ bool blur_loaded = false;
++ QMetaObject::invokeMethod(effects, "isEffectLoaded", Qt::DirectConnection, Q_RETURN_ARG(bool, blur_loaded), Q_ARG(QString, "blur"));
++
++ if (blur_loaded) {
++ qWarning() << "will try unload builtIn blur effect of kwin";
++ QMetaObject::invokeMethod(effects, "unloadEffect", Qt::DirectConnection, Q_ARG(QString, "blur"));
++ }
++}
++
+ void BlurEffect::doBlur(const QRegion& shape, const QRect& screen, const float opacity, const QMatrix4x4 &screenProjection, bool isDock, QRect windowRect)
+ {
++ unloadBuiltinBlur();
+ // Blur would not render correctly on a secondary monitor because of wrong coordinates
+ // BUG: 393723
+ const int xTranslate = -screen.x();
+diff --git a/plugins/kwineffects/blur/blur.h b/plugins/kwineffects/blur/blur.h
+index 7c76a82..ac0c21e 100644
+--- a/plugins/kwineffects/blur/blur.h
++++ b/plugins/kwineffects/blur/blur.h
+@@ -88,6 +88,7 @@ public Q_SLOTS:
+ void uploadRegion(QVector2D *&map, const QRegion ®ion, const int downSampleIterations);
+ void uploadGeometry(GLVertexBuffer *vbo, const QRegion &blurRegion, const QRegion &windowRegion);
+ void generateNoiseTexture();
++ void unloadBuiltinBlur();
+
+ void upscaleRenderToScreen(GLVertexBuffer *vbo, int vboStart, int blurRectCount, QMatrix4x4 screenProjection, QPoint windowPosition);
+ void downSampleTexture(GLVertexBuffer *vbo, int blurRectCount);
Copied: deepin-kwin/repos/community-staging-x86_64/kwin-5.19.patch (from rev 757756, deepin-kwin/trunk/kwin-5.19.patch)
===================================================================
--- community-staging-x86_64/kwin-5.19.patch (rev 0)
+++ community-staging-x86_64/kwin-5.19.patch 2020-11-19 20:59:26 UTC (rev 757757)
@@ -0,0 +1,124 @@
+commit fabc394472e1b8b8dea11497f56990bc9a1432bf
+Author: Felix Yan <felixonmars at archlinux.org>
+Date: Wed Jun 10 23:10:29 2020 +0800
+
+ fix: compatibility with kwin 5.19
+
+diff --git a/plugins/platforms/lib/kwinutils.cpp b/plugins/platforms/lib/kwinutils.cpp
+index ed68ec8..f01a91e 100644
+--- a/plugins/platforms/lib/kwinutils.cpp
++++ b/plugins/platforms/lib/kwinutils.cpp
+@@ -589,7 +589,7 @@ QObject *KWinUtils::tabBox()
+
+ QObject *KWinUtils::cursor()
+ {
+- return KWin::Cursor::s_self;
++ return nullptr; //KWin::Cursor;
+ }
+
+ QObject *KWinUtils::virtualDesktop()
+diff --git a/plugins/kwineffects/blur/blur.cpp b/plugins/kwineffects/blur/blur.cpp
+index b5cae9e..0354bc0 100644
+--- a/plugins/kwineffects/blur/blur.cpp
++++ b/plugins/kwineffects/blur/blur.cpp
+@@ -32,10 +32,10 @@
+ #include <cmath> // for ceil()
+ #include <QTimer>
+
+-#include <KWayland/Server/surface_interface.h>
+-#include <KWayland/Server/blur_interface.h>
+-#include <KWayland/Server/shadow_interface.h>
+-#include <KWayland/Server/display.h>
++#include <KWaylandServer/surface_interface.h>
++#include <KWaylandServer/blur_interface.h>
++#include <KWaylandServer/shadow_interface.h>
++#include <KWaylandServer/display.h>
+
+ static const QByteArray s_blurAtomName = QByteArrayLiteral("_KDE_NET_WM_BLUR_BEHIND_REGION");
+
+@@ -61,10 +61,9 @@ BlurEffect::BlurEffect(QObject *, const QVariantList &)
+ // Should be included in _NET_SUPPORTED instead.
+ if (m_shader && m_shader->isValid() && m_renderTargetsValid) {
+ net_wm_blur_region = effects->announceSupportProperty(s_blurAtomName, this);
+- KWayland::Server::Display *display = effects->waylandDisplay();
++ KWaylandServer::Display *display = effects->waylandDisplay();
+ if (display) {
+ m_blurManager = display->createBlurManager(this);
+- m_blurManager->create();
+ }
+ } else {
+ net_wm_blur_region = 0;
+@@ -310,7 +309,7 @@ void BlurEffect::updateBlurRegion(EffectWindow *w) const
+ }
+ }
+
+- KWayland::Server::SurfaceInterface *surf = w->surface();
++ KWaylandServer::SurfaceInterface *surf = w->surface();
+
+ if (surf && surf->blur()) {
+ region = surf->blur()->region();
+@@ -338,10 +337,10 @@ void BlurEffect::updateBlurRegion(EffectWindow *w) const
+
+ void BlurEffect::slotWindowAdded(EffectWindow *w)
+ {
+- KWayland::Server::SurfaceInterface *surf = w->surface();
++ KWaylandServer::SurfaceInterface *surf = w->surface();
+
+ if (surf) {
+- windowBlurChangedConnections[w] = connect(surf, &KWayland::Server::SurfaceInterface::blurChanged, this, [this, w] () {
++ windowBlurChangedConnections[w] = connect(surf, &KWaylandServer::SurfaceInterface::blurChanged, this, [this, w] () {
+ if (w) {
+ updateBlurRegion(w);
+ }
+@@ -445,7 +444,7 @@ QRegion BlurEffect::blurRegion(const EffectWindow *w) const
+ const QRegion appRegion = qvariant_cast<QRegion>(value);
+ if (!appRegion.isEmpty()) {
+ if (w->decorationHasAlpha() && effects->decorationSupportsBlurBehind()) {
+- region = w->shape();
++ region = w->shape() & w->rect();
+ region -= w->decorationInnerRect();
+ }
+ region |= appRegion.translated(w->contentsRect().topLeft()) &
+@@ -453,12 +452,12 @@ QRegion BlurEffect::blurRegion(const EffectWindow *w) const
+ } else {
+ // An empty region means that the blur effect should be enabled
+ // for the whole window.
+- region = w->shape();
++ region = w->shape() & w->rect();
+ }
+ } else if (w->decorationHasAlpha() && effects->decorationSupportsBlurBehind()) {
+ // If the client hasn't specified a blur region, we'll only enable
+ // the effect behind the decoration.
+- region = w->shape();
++ region = w->shape() & w->rect();
+ region -= w->decorationInnerRect();
+ }
+
+diff --git a/plugins/kwineffects/blur/blur.h b/plugins/kwineffects/blur/blur.h
+index 7c76a82..53740ef 100644
+--- a/plugins/kwineffects/blur/blur.h
++++ b/plugins/kwineffects/blur/blur.h
+@@ -31,13 +31,10 @@
+
+ using namespace KWin;
+
+-namespace KWayland
+-{
+-namespace Server
++namespace KWaylandServer
+ {
+ class BlurManagerInterface;
+ }
+-}
+
+ static const int borderSize = 5;
+
+@@ -131,7 +128,7 @@ private:
+ QVector <BlurValuesStruct> blurStrengthValues;
+
+ QMap <EffectWindow*, QMetaObject::Connection> windowBlurChangedConnections;
+- KWayland::Server::BlurManagerInterface *m_blurManager = nullptr;
++ KWaylandServer::BlurManagerInterface *m_blurManager = nullptr;
+ };
+
+ inline
More information about the arch-commits
mailing list