diff --git a/effects.cpp b/effects.cpp index 889cd35d4e..b124ee4146 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1340,6 +1340,12 @@ QRect EffectWindowImpl::contentsRect() const return QRect( toplevel->clientPos(), toplevel->clientSize()); } +QRect EffectWindowImpl::decorationInnerRect() const + { + Client *client = dynamic_cast(toplevel); + return client ? client->transparentRect() : contentsRect(); + } + QByteArray EffectWindowImpl::readProperty( long atom, long type, int format ) const { return readWindowProperty( window()->window(), atom, type, format ); diff --git a/effects.h b/effects.h index 8aef7a426c..873b7620d5 100644 --- a/effects.h +++ b/effects.h @@ -239,6 +239,7 @@ class EffectWindowImpl : public EffectWindow virtual bool isUserResize() const; virtual QRect iconGeometry() const; virtual QRect contentsRect() const; + virtual QRect decorationInnerRect() const; virtual QByteArray readProperty( long atom, long type, int format ) const; virtual void deleteProperty( long atom ) const; diff --git a/lib/kwineffects.h b/lib/kwineffects.h index a2fc14a111..3270fe5969 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -864,6 +864,12 @@ class KWIN_EXPORT EffectWindow * Geometry of the actual window contents inside the whole (including decorations) window. */ virtual QRect contentsRect() const = 0; + /** + * Geometry of the transparent rect in the decoration. + * May be different from contentsRect() if the decoration is extended into the client area. + * @since 4.5 + */ + virtual QRect decorationInnerRect() const = 0; bool hasDecoration() const; virtual QByteArray readProperty( long atom, long type, int format ) const = 0; virtual void deleteProperty( long atom ) const = 0;