diff --git a/effects.cpp b/effects.cpp index 8138af70cc..53c9327613 100644 --- a/effects.cpp +++ b/effects.cpp @@ -981,6 +981,11 @@ QRect EffectWindowImpl::geometry() const return toplevel->geometry(); } +QRegion EffectWindowImpl::shape() const + { + return sw ? sw->shape() : geometry(); + } + QSize EffectWindowImpl::size() const { return toplevel->size(); diff --git a/effects.h b/effects.h index 3864b1578c..9d38860e03 100644 --- a/effects.h +++ b/effects.h @@ -183,6 +183,7 @@ class EffectWindowImpl : public EffectWindow virtual int width() const; virtual int height() const; virtual QRect geometry() const; + virtual QRegion shape() const; virtual QPoint pos() const; virtual QSize size() const; virtual QRect rect() const; diff --git a/lib/kwineffects.h b/lib/kwineffects.h index 667502721a..165c166cfe 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -490,6 +490,7 @@ class KWIN_EXPORT EffectWindow virtual int width() const = 0; virtual int height() const = 0; virtual QRect geometry() const = 0; + virtual QRegion shape() const = 0; virtual QPoint pos() const = 0; virtual QSize size() const = 0; virtual QRect rect() const = 0; @@ -627,7 +628,14 @@ class KWIN_EXPORT WindowPrePaintData { public: int mask; + /** + * Region that will be painted, in screen coordinates. + **/ QRegion paint; + /** + * The clip region will be substracted from paint region of following windows. + * I.e. window will definitely cover it's clip region + **/ QRegion clip; WindowQuadList quads; /**