[arch-commits] Commit in deepin-kwin/trunk (PKGBUILD kwin-5.19.patch)

Felix Yan felixonmars at archlinux.org
Wed Jun 10 15:28:52 UTC 2020


    Date: Wednesday, June 10, 2020 @ 15:28:51
  Author: felixonmars
Revision: 641542

upgpkg: deepin-kwin 5.1.0-2: fix compatibility with kwin 5.19

Added:
  deepin-kwin/trunk/kwin-5.19.patch
Modified:
  deepin-kwin/trunk/PKGBUILD

-----------------+
 PKGBUILD        |    9 ++-
 kwin-5.19.patch |  124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 130 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-06-10 15:28:17 UTC (rev 641541)
+++ PKGBUILD	2020-06-10 15:28:51 UTC (rev 641542)
@@ -4,7 +4,7 @@
 
 pkgname=deepin-kwin
 pkgver=5.1.0
-pkgrel=1
+pkgrel=2
 pkgdesc='KWin configures on DDE'
 arch=('x86_64')
 url="https://github.com/linuxdeepin/dde-kwin"
@@ -16,12 +16,14 @@
         $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::https://github.com/linuxdeepin/dde-kwin/pull/112.patch
-        deepin-kwin-qt5.15.patch)
+        deepin-kwin-qt5.15.patch
+        kwin-5.19.patch)
 sha512sums=('9d00b48c7f9eb4ce9526d2ef94c363ed185e6a396c4925af940f40c6c81e97eb76aa7c98a66ce5b3c3c3116716ee79b0f0fc62ecedbaeb5853595cd1e8bf86d4'
             '7ac1a577868b73314274d336287334acc5bf4ac06dde046c93e4c2d3f68a112389c8b0644d1cbc3fde5ba1c01f368676f4f34b4a1b7b6c97a5b73d66507d134d'
             '3e10241050959b51bdd6bf752253af61a2b5899c3df5d84716bd1688d9292ff65d2b7d3aea8f61e896081a9bee013cb3f4c2f42f7915038f7f476120a44cf029'
             '800bb8770b4a6d835e27f33226f81dce92ddf10c295e02015419788e667e7d46b014d69bde73d03af8f0480c938526b48498368d2f16619689352f0e8e183912'
-            '8fe73f833e2b24fe9bbaf12220a9d41d5e4808c833d7e7878635a85429e6c474ae79189d75d1d4e77c78bafbe2855db37ded24c85768f9a9415a00a0456c9dce')
+            '8fe73f833e2b24fe9bbaf12220a9d41d5e4808c833d7e7878635a85429e6c474ae79189d75d1d4e77c78bafbe2855db37ded24c85768f9a9415a00a0456c9dce'
+            '834ca1372c4e17ec62edecf81d30814ddd063bdb7d4362da8260a6ac23c19600819cb9c62dd7070fc57ff20546667ad84db7cde6de543358298348ce18781aaf')
 
 prepare() {
   cd dde-kwin-$pkgver
@@ -29,6 +31,7 @@
   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() {

Added: kwin-5.19.patch
===================================================================
--- kwin-5.19.patch	                        (rev 0)
+++ kwin-5.19.patch	2020-06-10 15:28:51 UTC (rev 641542)
@@ -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/kwin-xcb/lib/kwinutils.cpp b/plugins/kwin-xcb/lib/kwinutils.cpp
+index ed68ec8..f01a91e 100644
+--- a/plugins/kwin-xcb/lib/kwinutils.cpp
++++ b/plugins/kwin-xcb/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