From 798d437e03a1392f4762ad2e2433818207374f2c Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Wed, 24 Jan 2007 20:15:38 +0000 Subject: [PATCH] Add iconGeometry() method to Client. It returns rectangle of the taskbar entry of the window. svn path=/branches/work/kwin_composite/; revision=626867 --- client.cpp | 9 +++++++-- client.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client.cpp b/client.cpp index fe437e6732..73315e6e79 100644 --- a/client.cpp +++ b/client.cpp @@ -598,6 +598,12 @@ void Client::unminimize( bool avoid_animation ) 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; void Client::animateMinimizeOrUnminimize( bool minimize ) @@ -627,8 +633,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize ) step = 40. * (11 - speed ); - NETRect r = info->iconGeometry(); - QRect icongeom( r.pos.x, r.pos.y, r.size.width, r.size.height ); + QRect icongeom = iconGeometry(); if ( !icongeom.isValid() ) return; diff --git a/client.h b/client.h index 1148a39a3c..01770a83fe 100644 --- a/client.h +++ b/client.h @@ -130,6 +130,7 @@ class Client MaximizeMode maximizeMode() const; bool isMinimizable() const; void setMaximize( bool vertically, bool horizontally ); + QRect iconGeometry() const; void setFullScreen( bool set, bool user ); bool isFullScreen() const;