Add iconGeometry() method to Client.

It returns rectangle of the taskbar entry of the window.

svn path=/branches/work/kwin_composite/; revision=626867
This commit is contained in:
Rivo Laks 2007-01-24 20:15:38 +00:00
parent a00b314b5a
commit 798d437e03
2 changed files with 8 additions and 2 deletions

View file

@ -598,6 +598,12 @@ void Client::unminimize( bool avoid_animation )
effects->windowUnminimized( effectWindow()); effects->windowUnminimized( effectWindow());
} }
QRect Client::iconGeometry() const
{
NETRect r = info->iconGeometry();
return QRect( r.pos.x, r.pos.y, r.size.width, r.size.height );
}
extern bool blockAnimation; extern bool blockAnimation;
void Client::animateMinimizeOrUnminimize( bool minimize ) void Client::animateMinimizeOrUnminimize( bool minimize )
@ -627,8 +633,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize )
step = 40. * (11 - speed ); step = 40. * (11 - speed );
NETRect r = info->iconGeometry(); QRect icongeom = iconGeometry();
QRect icongeom( r.pos.x, r.pos.y, r.size.width, r.size.height );
if ( !icongeom.isValid() ) if ( !icongeom.isValid() )
return; return;

View file

@ -130,6 +130,7 @@ class Client
MaximizeMode maximizeMode() const; MaximizeMode maximizeMode() const;
bool isMinimizable() const; bool isMinimizable() const;
void setMaximize( bool vertically, bool horizontally ); void setMaximize( bool vertically, bool horizontally );
QRect iconGeometry() const;
void setFullScreen( bool set, bool user ); void setFullScreen( bool set, bool user );
bool isFullScreen() const; bool isFullScreen() const;