[arch-commits] Commit in deepin-kwin/trunk (PKGBUILD kwin-5.17.patch)
Felix Yan
felixonmars at archlinux.org
Thu Oct 17 11:16:31 UTC 2019
Date: Thursday, October 17, 2019 @ 11:16:31
Author: felixonmars
Revision: 516406
upgpkg: deepin-kwin 0.1.0-3
fix compatibility issues with kwin 5.17 (https://github.com/linuxdeepin/developer-center/issues/1568)
Added:
deepin-kwin/trunk/kwin-5.17.patch
Modified:
deepin-kwin/trunk/PKGBUILD
-----------------+
PKGBUILD | 13 ++++++++--
kwin-5.17.patch | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 74 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-10-17 11:06:43 UTC (rev 516405)
+++ PKGBUILD 2019-10-17 11:16:31 UTC (rev 516406)
@@ -4,7 +4,7 @@
pkgname=deepin-kwin
pkgver=0.1.0
-pkgrel=2
+pkgrel=3
pkgdesc='KWin configures on DDE'
arch=('x86_64')
url="https://github.com/linuxdeepin/dde-kwin"
@@ -11,9 +11,16 @@
license=('GPL3')
depends=('deepin-qt5integration' 'kwin')
makedepends=('cmake' 'expac' 'qt5-tools')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-kwin/archive/$pkgver.tar.gz")
-sha512sums=('ae670e9f7763df5d614b39e6e0752e04a8ff56cfedaac06272a3a626fe61b3be11cc68d17fb6e2758d50b55a8895e9932d4a70720fcecd8c0e26737aa35a6061')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/dde-kwin/archive/$pkgver.tar.gz"
+ kwin-5.17.patch)
+sha512sums=('ae670e9f7763df5d614b39e6e0752e04a8ff56cfedaac06272a3a626fe61b3be11cc68d17fb6e2758d50b55a8895e9932d4a70720fcecd8c0e26737aa35a6061'
+ '6ac5358d4b8aeefd086e4396603cff453051e5bba7237c1e1524659de6741142be840da90556606fda47c8ecde8da30df4caf2508611d7b5de1066c2a33f8521')
+prepare() {
+ cd dde-kwin-$pkgver
+ patch -p2 -i ../kwin-5.17.patch
+}
+
build() {
cd dde-kwin-$pkgver
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DKWIN_VERSION=$(expac %v kwin | cut -d - -f 1)
Added: kwin-5.17.patch
===================================================================
--- kwin-5.17.patch (rev 0)
+++ kwin-5.17.patch 2019-10-17 11:16:31 UTC (rev 516406)
@@ -0,0 +1,64 @@
+diff --git a/dde-kwin-0.1.0/plugins/kwin-xcb/lib/kwinutils.cpp.orig b/dde-kwin-0.1.0/plugins/kwin-xcb/lib/kwinutils.cpp
+index 999f23b..b618c54 100644
+--- a/dde-kwin-0.1.0/plugins/kwin-xcb/lib/kwinutils.cpp.orig
++++ b/dde-kwin-0.1.0/plugins/kwin-xcb/lib/kwinutils.cpp
+@@ -129,10 +129,6 @@ class Compositor : public QObject
+ public:
+ enum SuspendReason { NoReasonSuspend = 0, UserSuspend = 1<<0, BlockRuleSuspend = 1<<1, ScriptSuspend = 1<<2, AllReasonSuspend = 0xff };
+ static Compositor *s_compositor;
+-
+-public Q_SLOTS:
+- void suspend(Compositor::SuspendReason reason);
+- void resume(Compositor::SuspendReason reason);
+ };
+
+ // 光标管理
+@@ -222,6 +218,7 @@ class KWinInterface
+ typedef xcb_cursor_t (*X11CursorGetCursor)(Qt::CursorShape);
+ typedef KWin::Options::WindowOperation (*OptionsWindowOperation)(const QString &, bool);
+ typedef QObject *(*WorkspaceFindClient)(KWinUtils::Predicate, xcb_window_t);
++ typedef void (*CompositorToggle)(void *, KWin::Compositor::SuspendReason);
+ public:
+ KWinInterface()
+ {
+@@ -232,6 +229,8 @@ public:
+ x11CursorGetCursor = (X11CursorGetCursor)KWinUtils::resolve("_ZN4KWin6Cursor12getX11CursorEN2Qt11CursorShapeE");
+ optionsWindowOperation = (OptionsWindowOperation)KWinUtils::resolve("_ZN4KWin7Options15windowOperationERK7QStringb");
+ findClient = (WorkspaceFindClient)KWinUtils::resolve("_ZNK4KWin9Workspace10findClientENS_9PredicateEj");
++ compositorSuspend = (CompositorToggle)KWinUtils::resolve("_ZN4KWin13X11Compositor7suspendENS0_13SuspendReasonE");
++ compositorResume = (CompositorToggle)KWinUtils::resolve("_ZN4KWin13X11Compositor6resumeENS0_13SuspendReasonE");
+ }
+
+ ClientMaximizeMode clientMaximizeMode;
+@@ -241,6 +240,8 @@ public:
+ X11CursorGetCursor x11CursorGetCursor;
+ OptionsWindowOperation optionsWindowOperation;
+ WorkspaceFindClient findClient;
++ CompositorToggle compositorSuspend;
++ CompositorToggle compositorResume;
+ };
+
+ Q_GLOBAL_STATIC(KWinInterface, interface)
+@@ -609,18 +610,18 @@ void KWinUtils::ShowWorkspacesView()
+
+ void KWinUtils::ResumeCompositor(int type)
+ {
+- if (!KWin::Compositor::s_compositor)
++ if (!KWin::Compositor::s_compositor || !interface->compositorResume)
+ return;
+
+- KWin::Compositor::s_compositor->resume(static_cast<KWin::Compositor::SuspendReason>(type));
++ interface->compositorResume(KWin::Compositor::s_compositor, static_cast<KWin::Compositor::SuspendReason>(type));
+ }
+
+ void KWinUtils::SuspendCompositor(int type)
+ {
+- if (!KWin::Compositor::s_compositor)
++ if (!KWin::Compositor::s_compositor || !interface->compositorSuspend)
+ return;
+
+- KWin::Compositor::s_compositor->suspend(static_cast<KWin::Compositor::SuspendReason>(type));
++ interface->compositorSuspend(KWin::Compositor::s_compositor, static_cast<KWin::Compositor::SuspendReason>(type));
+ }
+
+ void KWinUtils::ShowAllWindowsView()
More information about the arch-commits
mailing list