File fix-build-on-5_18_6.patch of Package deepin-kwin.17646
@@ -1,37 +0,0 @@
diff --git a/plugins/kwineffects/black-screen/black-screen.cpp b/plugins/kwineffects/black-screen/black-screen.cpp
index 0466091bc..c75424627 100644
--- a/plugins/kwineffects/black-screen/black-screen.cpp
+++ b/plugins/kwineffects/black-screen/black-screen.cpp
@@ -43,9 +43,14 @@ BlackScreenEffect::~BlackScreenEffect()
{
QDBusConnection::sessionBus().unregisterObject(QStringLiteral("/BlackScreen"));
}
-
+#if KWIN_VERSION_MIN > 17 || (KWIN_VERSION_MIN == 17 && KWIN_VERSION_PAT > 5)
+void BlackScreenEffect::drawWindow(KWin::EffectWindow *w, int mask, const QRegion &_region, KWin::WindowPaintData &data)
+{
+ QRegion region = _region;
+#else
void BlackScreenEffect::drawWindow(KWin::EffectWindow *w, int mask, QRegion region, KWin::WindowPaintData &data)
{
+#endif
if (!m_activated) {
effects->drawWindow(w, mask, region, data);
return;
diff --git a/plugins/kwineffects/black-screen/black-screen.h b/plugins/kwineffects/black-screen/black-screen.h
index 3f81a78c3..c5ae61108 100644
--- a/plugins/kwineffects/black-screen/black-screen.h
+++ b/plugins/kwineffects/black-screen/black-screen.h
@@ -41,8 +41,11 @@ public:
BlackScreenEffect(QObject *parent = nullptr, const QVariantList &args = QVariantList());
~BlackScreenEffect() override;
-
+#if KWIN_VERSION_MIN > 17 || (KWIN_VERSION_MIN == 17 && KWIN_VERSION_PAT > 5)
+ void drawWindow(KWin::EffectWindow* w, int mask, const QRegion ®ion, KWin::WindowPaintData& data) override;
+#else
void drawWindow(KWin::EffectWindow* w, int mask, QRegion region, KWin::WindowPaintData& data) override;
+#endif
virtual bool isActive() const override;
int requestedEffectChainPosition() const override {
return 1;