Expose the decoration inner rect to effects.

svn path=/trunk/KDE/kdebase/workspace/; revision=1102475
icc-effect-5.14.5
Fredrik Höglund 2010-03-12 16:33:01 +00:00
parent 69ab6ec3b7
commit 7ad2203084
3 changed files with 13 additions and 0 deletions

View File

@ -1340,6 +1340,12 @@ QRect EffectWindowImpl::contentsRect() const
return QRect( toplevel->clientPos(), toplevel->clientSize());
}
QRect EffectWindowImpl::decorationInnerRect() const
{
Client *client = dynamic_cast<Client*>(toplevel);
return client ? client->transparentRect() : contentsRect();
}
QByteArray EffectWindowImpl::readProperty( long atom, long type, int format ) const
{
return readWindowProperty( window()->window(), atom, type, format );

View File

@ -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;

View File

@ -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;