From 5ea88effeee9b8036471c61fab600a195ad33852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 12 Aug 2016 11:31:04 +0200 Subject: [PATCH] Implement addDamage in Unmanaged For Xwayland Unmanaged needs to override the addDamage method and update the repaints_region accordingly, otherwise the repaint is not triggered for the Unmanaged window. Reviewed-By: bshah --- unmanaged.cpp | 6 ++++++ unmanaged.h | 1 + 2 files changed, 7 insertions(+) diff --git a/unmanaged.cpp b/unmanaged.cpp index 1a76175605..c10a674a8b 100644 --- a/unmanaged.cpp +++ b/unmanaged.cpp @@ -154,5 +154,11 @@ NET::WindowType Unmanaged::windowType(bool direct, int supportedTypes) const return info->windowType(NET::WindowTypes(supportedTypes)); } +void Unmanaged::addDamage(const QRegion &damage) +{ + repaints_region += damage; + Toplevel::addDamage(damage); +} + } // namespace diff --git a/unmanaged.h b/unmanaged.h index 6cee6c1cba..b7dc1ec62d 100644 --- a/unmanaged.h +++ b/unmanaged.h @@ -51,6 +51,7 @@ public Q_SLOTS: void release(ReleaseReason releaseReason = ReleaseReason::Release); protected: virtual void debug(QDebug& stream) const; + void addDamage(const QRegion &damage) override; private: virtual ~Unmanaged(); // use release() // handlers for X11 events