From 8762a1ac55ea34a578e05fbfbf4f3b85aff8ce38 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Sat, 24 Jul 2010 21:45:25 +0000 Subject: [PATCH] Tried improve performances during title transitions by triggering updates of the title area only. svn path=/trunk/KDE/kdebase/workspace/; revision=1154145 --- clients/oxygen/oxygenclient.cpp | 6 +++--- clients/oxygen/oxygenclient.h | 8 +++++++- clients/oxygen/oxygenclientgroupitemdata.cpp | 3 +-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 0e01afbeb6..4967384253 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -124,7 +124,7 @@ namespace Oxygen // title animation data titleAnimationData_.data()->initialize(); - connect( titleAnimationData_.data(), SIGNAL( pixmapsChanged() ), widget(), SLOT( update( void ) ) ); + connect( titleAnimationData_.data(), SIGNAL( pixmapsChanged() ), SLOT( updateTitleRect() ) ); // lists connect( itemData_.animation().data(), SIGNAL( finished() ), this, SLOT( clearTargetItem() ) ); @@ -1695,8 +1695,8 @@ namespace Oxygen itemData_.setDirty( true ); moveItemInClientGroup( from, itemClicked ); - widget()->update(); - + updateTitleRect(); + } else { setForceActive( true ); diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index afa7d237b4..4ce5a75228 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -204,6 +204,12 @@ namespace Oxygen //! resize event virtual void resizeEvent(QResizeEvent *e); + + public slots: + + //! triggers widget update in titleRect only + void updateTitleRect( void ) + { widget()->update( titleRect() ); } protected: @@ -365,7 +371,7 @@ namespace Oxygen //! clear force active flag void clearForceActive( void ) { if( isActive() ) setForceActive( false ); } - + //! title bounding rects /*! calculate and return title bounding rects in case of tabbed window */ void updateItemBoundingRects( bool alsoUpdate = true ); diff --git a/clients/oxygen/oxygenclientgroupitemdata.cpp b/clients/oxygen/oxygenclientgroupitemdata.cpp index 0a52583a14..9edf97bd7d 100644 --- a/clients/oxygen/oxygenclientgroupitemdata.cpp +++ b/clients/oxygen/oxygenclientgroupitemdata.cpp @@ -283,7 +283,6 @@ namespace Oxygen { // move close buttons - // this should move to ClientGroupItemDataList if( alsoUpdate ) client_.widget()->setUpdatesEnabled( false ); for( int index = 0; index < count(); index++ ) { @@ -312,7 +311,7 @@ namespace Oxygen if( alsoUpdate ) { client_.widget()->setUpdatesEnabled( true ); - client_.widget()->update(); + client_.updateTitleRect(); } }