From e6a90e1a6f5b3038ff2d89561d06c62bb9a70d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 14 Oct 2009 07:22:11 +0000 Subject: [PATCH] Unmanaged windows are always kept in place like panels during the cube switch animation. That's a small hack to get the desktop switch on screen display to not rotate and by that useable when cube is used. svn path=/trunk/KDE/kdebase/workspace/; revision=1034981 --- effects/cube/cubeslide.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index dce83e1dbd..c476981487 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -66,8 +66,7 @@ void CubeSlideEffect::prePaintScreen( ScreenPrePaintData& data, int time) timeLine.addTime( time ); if( dontSlidePanels ) panels.clear(); - if( dontSlideStickyWindows ) - stickyWindows.clear(); + stickyWindows.clear(); } effects->prePaintScreen( data, time ); } @@ -96,13 +95,10 @@ void CubeSlideEffect::paintScreen( int mask, QRegion region, ScreenPaintData& da effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData ); } } - if( dontSlideStickyWindows ) + foreach( EffectWindow* w, stickyWindows ) { - foreach( EffectWindow* w, stickyWindows ) - { - WindowPaintData wData( w ); - effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData ); - } + WindowPaintData wData( w ); + effects->paintWindow( w, 0, QRegion( w->x(), w->y(), w->width(), w->height() ), wData ); } } else @@ -204,7 +200,11 @@ void CubeSlideEffect::prePaintWindow( EffectWindow* w, WindowPrePaintData& data { panels.insert( w ); } - if( dontSlideStickyWindows && !w->isDock() && + if( !w->isManaged() ) + { + stickyWindows.insert( w ); + } + else if( dontSlideStickyWindows && !w->isDock() && !w->isDesktop() && w->isOnAllDesktops()) { stickyWindows.insert( w ); @@ -278,8 +278,7 @@ void CubeSlideEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Wi { if( dontSlidePanels && w->isDock() ) return; - if( dontSlideStickyWindows && - w->isOnAllDesktops() && !w->isDock() && !w->isDesktop() ) + if( stickyWindows.contains( w ) ) return; // filter out quads overlapping the edges