From 5d1c5d355fa71ef885c51fb64a04affde0dcb66b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 13 May 2008 20:49:56 +0000 Subject: [PATCH] Skip windows not ready for painting before computing screen area to redraw. svn path=/trunk/KDE/kdebase/workspace/; revision=807441 --- composite.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/composite.cpp b/composite.cpp index 4157a38b92..048f37e7ba 100644 --- a/composite.cpp +++ b/composite.cpp @@ -300,6 +300,12 @@ void Workspace::performCompositing() windows.removeAll( t ); windows.append( t ); } + // skip windows that are not yet ready for being painted + ToplevelList tmp = windows; + windows.clear(); + foreach( Toplevel* c, tmp ) + if( c->readyForPainting()) + windows.append( c ); foreach( Toplevel* c, windows ) { // This could be possibly optimized WRT obscuring, but that'd need being already // past prePaint() phase - probably not worth it. @@ -308,11 +314,6 @@ void Workspace::performCompositing() repaints_region |= c->repaints().translated( c->pos()); c->resetRepaints( c->rect()); } - ToplevelList tmp = windows; - windows.clear(); - foreach( Toplevel* c, tmp ) - if( c->readyForPainting()) - windows.append( c ); QRegion repaints = repaints_region; // clear all repaints, so that post-pass can add repaints for the next repaint repaints_region = QRegion();