diff options
author | Alejandro Valdes | 2020-02-15 20:18:12 -0500 |
---|---|---|
committer | Alejandro Valdes | 2020-02-15 20:18:12 -0500 |
commit | 3fb79291be1a1c6e8249e4aa06d0d45fb9672c39 (patch) | |
tree | c43b7361cd34ded31b74d687ec6cdea7074bc660 | |
parent | b58985809343096956d2d6772cb66828d74dc368 (diff) | |
download | aur-3fb79291be1a1c6e8249e4aa06d0d45fb9672c39.tar.gz |
Fixed compilation with plasma 5.18
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | f411876086099638677d35c4cc023e5d046eff6a.patch | 60 |
3 files changed, 71 insertions, 5 deletions
@@ -1,14 +1,16 @@ pkgbase = kwin-effects-yet-another-magic-lamp pkgdesc = Just Yet Another Magic Lamp effect pkgver = 4.1 - pkgrel = 1 + pkgrel = 2 url = https://github.com/zzag/kwin-effects-yet-another-magic-lamp arch = x86_64 license = GPL3 makedepends = extra-cmake-modules depends = kwin source = kwin-effects-yet-another-magic-lamp-4.1.tar.gz::https://github.com/zzag/kwin-effects-yet-another-magic-lamp/archive/4.1.tar.gz + source = f411876086099638677d35c4cc023e5d046eff6a.patch sha256sums = 12832e90ab52bb32239b8b1f4e3039250b68486f37e82e88c85eba89651fcb99 + sha256sums = 74c7ba20069bb61f0291dd9f40535a943eefc1a69f5e350001bc36951ddb980c pkgname = kwin-effects-yet-another-magic-lamp @@ -2,18 +2,22 @@ pkgname=kwin-effects-yet-another-magic-lamp pkgver=4.1 -pkgrel=1 +pkgrel=2 pkgdesc="Just Yet Another Magic Lamp effect" arch=('x86_64') url="https://github.com/zzag/$pkgname" license=('GPL3') -depends=(kwin) +depends=('kwin>=5.18.0') makedepends=(extra-cmake-modules) -source=(${pkgname}-${pkgver}.tar.gz::https://github.com/zzag/${pkgname}/archive/${pkgver}.tar.gz) -sha256sums=('12832e90ab52bb32239b8b1f4e3039250b68486f37e82e88c85eba89651fcb99') +source=(${pkgname}-${pkgver}.tar.gz::https://github.com/zzag/${pkgname}/archive/${pkgver}.tar.gz + f411876086099638677d35c4cc023e5d046eff6a.patch) +sha256sums=('12832e90ab52bb32239b8b1f4e3039250b68486f37e82e88c85eba89651fcb99' + '74c7ba20069bb61f0291dd9f40535a943eefc1a69f5e350001bc36951ddb980c') prepare() { mkdir -p build + cd $srcdir/$pkgname-$pkgver + patch --forward --strip=1 --input="${srcdir}/f411876086099638677d35c4cc023e5d046eff6a.patch" } build() { diff --git a/f411876086099638677d35c4cc023e5d046eff6a.patch b/f411876086099638677d35c4cc023e5d046eff6a.patch new file mode 100644 index 000000000000..96aea46f4bfd --- /dev/null +++ b/f411876086099638677d35c4cc023e5d046eff6a.patch @@ -0,0 +1,60 @@ +From f411876086099638677d35c4cc023e5d046eff6a Mon Sep 17 00:00:00 2001 +From: Vlad Zahorodnii <vladzzag@gmail.com> +Date: Fri, 17 Jan 2020 21:16:41 +0200 +Subject: [PATCH] Fix build with KDE Plasma 5.18 LTS + +Fixes #21 +--- + src/YetAnotherMagicLampEffect.cc | 10 ++++++++-- + src/YetAnotherMagicLampEffect.h | 5 +++++ + 2 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/YetAnotherMagicLampEffect.cc b/src/YetAnotherMagicLampEffect.cc +index 98dbe59..77e35c1 100644 +--- a/src/YetAnotherMagicLampEffect.cc ++++ b/src/YetAnotherMagicLampEffect.cc +@@ -168,7 +168,11 @@ void YetAnotherMagicLampEffect::prePaintWindow(KWin::EffectWindow* w, KWin::Wind + KWin::effects->prePaintWindow(w, data, time); + } + ++#if KWIN_EFFECT_API_VERSION <= KWIN_EFFECT_API_MAKE_VERSION(0, 228) + void YetAnotherMagicLampEffect::drawWindow(KWin::EffectWindow* w, int mask, QRegion region, KWin::WindowPaintData& data) ++#else ++void YetAnotherMagicLampEffect::drawWindow(KWin::EffectWindow* w, int mask, const QRegion& region, KWin::WindowPaintData& data) ++#endif + { + auto modelIt = m_models.constFind(w); + if (modelIt == m_models.constEnd()) { +@@ -180,11 +184,13 @@ void YetAnotherMagicLampEffect::drawWindow(KWin::EffectWindow* w, int mask, QReg + QVector<WindowQuad> quads = m_meshRenderer->makeGrid(w, m_gridResolution); + (*modelIt).apply(quads); + ++ QRegion clipRegion = region; ++ + if ((*modelIt).needsClip()) { +- region = (*modelIt).clipRegion(); ++ clipRegion = (*modelIt).clipRegion(); + } + +- m_meshRenderer->render(w, quads, texture, region); ++ m_meshRenderer->render(w, quads, texture, clipRegion); + } + + bool YetAnotherMagicLampEffect::isActive() const +diff --git a/src/YetAnotherMagicLampEffect.h b/src/YetAnotherMagicLampEffect.h +index 8d4325a..0455278 100644 +--- a/src/YetAnotherMagicLampEffect.h ++++ b/src/YetAnotherMagicLampEffect.h +@@ -40,7 +40,12 @@ class YetAnotherMagicLampEffect : public KWin::Effect { + void postPaintScreen() override; + + void prePaintWindow(KWin::EffectWindow* w, KWin::WindowPrePaintData& data, int time) override; ++ ++#if KWIN_EFFECT_API_VERSION <= KWIN_EFFECT_API_MAKE_VERSION(0, 228) + void drawWindow(KWin::EffectWindow* w, int mask, QRegion region, KWin::WindowPaintData& data) override; ++#else ++ void drawWindow(KWin::EffectWindow* w, int mask, const QRegion& region, KWin::WindowPaintData& data) override; ++#endif + + bool isActive() const override; + int requestedEffectChainPosition() const override; |