[arch-commits] Commit in deepin-kwin/repos/community-x86_64 (6 files)

Felix Yan felixonmars at archlinux.org
Sun Nov 29 19:52:06 UTC 2020


    Date: Sunday, November 29, 2020 @ 19:52:06
  Author: felixonmars
Revision: 766406

archrelease: copy trunk to community-x86_64

Added:
  deepin-kwin/repos/community-x86_64/PKGBUILD
    (from rev 766405, deepin-kwin/trunk/PKGBUILD)
  deepin-kwin/repos/community-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch
    (from rev 766405, deepin-kwin/trunk/deepin-kwin-added-functions-from-their-forked-kwin.patch)
  deepin-kwin/repos/community-x86_64/deepin-kwin-unload-blur.patch
    (from rev 766405, deepin-kwin/trunk/deepin-kwin-unload-blur.patch)
Deleted:
  deepin-kwin/repos/community-x86_64/PKGBUILD
  deepin-kwin/repos/community-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch
  deepin-kwin/repos/community-x86_64/deepin-kwin-unload-blur.patch

----------------------------------------------------------+
 PKGBUILD                                                 |   90 ++--
 deepin-kwin-added-functions-from-their-forked-kwin.patch |  266 ++++++-------
 deepin-kwin-unload-blur.patch                            |  132 +++---
 3 files changed, 244 insertions(+), 244 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-11-29 19:51:35 UTC (rev 766405)
+++ PKGBUILD	2020-11-29 19:52:06 UTC (rev 766406)
@@ -1,45 +0,0 @@
-# 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.5
-pkgrel=1
-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-unload-blur.patch
-        $pkgname-added-functions-from-their-forked-kwin.patch)
-sha512sums=('0da0e6fd0af3e4ec30354630ead40eab7df8f828f512bcc477e7ed8a0c13c8a693519265ce976f81025bb9fe4379a2f46887c789574004347fe971cfa3a7a304'
-            '7ac1a577868b73314274d336287334acc5bf4ac06dde046c93e4c2d3f68a112389c8b0644d1cbc3fde5ba1c01f368676f4f34b4a1b7b6c97a5b73d66507d134d'
-            '9c5bf86510d0fbba36e71997f55eda1b197b26af7eeb0adb9e06e7e3cc86b32c00cd23dfca872f4043f76a1d9435f916aae73536f10c7b3fe7e79a6e74a309d2'
-            '48a3bead1c7cde1261f5f710fd055c52f061320999064ba4cc96a81f9b0770ea2a8fba7aff37d20bb7671b219c38bf8424f24fd7742d36b3c6bf171d3874c1f4')
-
-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-unload-blur.patch
-
-  # https://github.com/linuxdeepin/dde-kwin/issues/127
-  sed -i '/m_blurManager->create/d' plugins/kwineffects/blur/blur.cpp
-}
-
-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-x86_64/PKGBUILD (from rev 766405, deepin-kwin/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-11-29 19:52:06 UTC (rev 766406)
@@ -0,0 +1,45 @@
+# 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.6
+pkgrel=1
+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-unload-blur.patch
+        $pkgname-added-functions-from-their-forked-kwin.patch)
+sha512sums=('6b867220b5382c44fa6a9502697c3ccf942be183cca4430e8efc055bf3cb9c173d2afe6caac05ae2b09614a040841de9997f9d25bd827fe3065a02f46d4b3752'
+            '7ac1a577868b73314274d336287334acc5bf4ac06dde046c93e4c2d3f68a112389c8b0644d1cbc3fde5ba1c01f368676f4f34b4a1b7b6c97a5b73d66507d134d'
+            '9c5bf86510d0fbba36e71997f55eda1b197b26af7eeb0adb9e06e7e3cc86b32c00cd23dfca872f4043f76a1d9435f916aae73536f10c7b3fe7e79a6e74a309d2'
+            '48a3bead1c7cde1261f5f710fd055c52f061320999064ba4cc96a81f9b0770ea2a8fba7aff37d20bb7671b219c38bf8424f24fd7742d36b3c6bf171d3874c1f4')
+
+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-unload-blur.patch
+
+  # https://github.com/linuxdeepin/dde-kwin/issues/127
+  sed -i '/m_blurManager->create/d' plugins/kwineffects/blur/blur.cpp
+}
+
+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
+}

Deleted: deepin-kwin-added-functions-from-their-forked-kwin.patch
===================================================================
--- deepin-kwin-added-functions-from-their-forked-kwin.patch	2020-11-29 19:51:35 UTC (rev 766405)
+++ deepin-kwin-added-functions-from-their-forked-kwin.patch	2020-11-29 19:52:06 UTC (rev 766406)
@@ -1,133 +0,0 @@
-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,20 @@ void DeepinWMFaker::BeginToMoveActiveWindow()
-     m_kwinUtilsInter->WindowMove();
- }
- 
-+void DeepinWMFaker::TouchToMove(int x, int y)
-+{
-+#ifndef DISABLE_DEEPIN_WM
-+    m_kwinUtilsInter->TouchPadToMoveWindow(x,y);
-+#endif
-+}
-+
-+void DeepinWMFaker::ClearMoveStatus()
-+{
-+#ifndef DISABLE_DEEPIN_WM
-+    m_kwinUtilsInter->EndTouchPadToMoveWindow();
-+#endif
-+}
-+
- 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-x86_64/deepin-kwin-added-functions-from-their-forked-kwin.patch (from rev 766405, deepin-kwin/trunk/deepin-kwin-added-functions-from-their-forked-kwin.patch)
===================================================================
--- deepin-kwin-added-functions-from-their-forked-kwin.patch	                        (rev 0)
+++ deepin-kwin-added-functions-from-their-forked-kwin.patch	2020-11-29 19:52:06 UTC (rev 766406)
@@ -0,0 +1,133 @@
+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,20 @@ void DeepinWMFaker::BeginToMoveActiveWindow()
+     m_kwinUtilsInter->WindowMove();
+ }
+ 
++void DeepinWMFaker::TouchToMove(int x, int y)
++{
++#ifndef DISABLE_DEEPIN_WM
++    m_kwinUtilsInter->TouchPadToMoveWindow(x,y);
++#endif
++}
++
++void DeepinWMFaker::ClearMoveStatus()
++{
++#ifndef DISABLE_DEEPIN_WM
++    m_kwinUtilsInter->EndTouchPadToMoveWindow();
++#endif
++}
++
+ 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>

Deleted: deepin-kwin-unload-blur.patch
===================================================================
--- deepin-kwin-unload-blur.patch	2020-11-29 19:51:35 UTC (rev 766405)
+++ deepin-kwin-unload-blur.patch	2020-11-29 19:52:06 UTC (rev 766406)
@@ -1,66 +0,0 @@
-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 &region, 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-x86_64/deepin-kwin-unload-blur.patch (from rev 766405, deepin-kwin/trunk/deepin-kwin-unload-blur.patch)
===================================================================
--- deepin-kwin-unload-blur.patch	                        (rev 0)
+++ deepin-kwin-unload-blur.patch	2020-11-29 19:52:06 UTC (rev 766406)
@@ -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 &region, 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);



More information about the arch-commits mailing list