From 2387e701f66499fc23f171d989dafd9f61df54a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 3 Dec 2008 10:56:46 +0000 Subject: [PATCH] Paint desktop windows only once in multi screen setups as we know that a desktop window is bound to a screen and there is one desktop window per screen. svn path=/trunk/KDE/kdebase/workspace/; revision=891952 --- effects/desktopgrid.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/effects/desktopgrid.cpp b/effects/desktopgrid.cpp index 709f7bd52c..115aee9fdd 100644 --- a/effects/desktopgrid.cpp +++ b/effects/desktopgrid.cpp @@ -216,6 +216,9 @@ void DesktopGridEffect::paintWindow( EffectWindow* w, int mask, QRegion region, for( int screen = 0; screen < effects->numScreens(); screen++ ) { + // Assume desktop windows can never be on two screens at once (Plasma makes one window per screen) + if( w->isDesktop() ) + screen = w->screen(); QRect screenGeom = effects->clientArea( ScreenArea, screen, 0 ); // Display all quads on the same screen on the same pass @@ -260,6 +263,9 @@ void DesktopGridEffect::paintWindow( EffectWindow* w, int mask, QRegion region, PaintClipper pc( effects->clientArea( ScreenArea, screen, 0 )); effects->paintWindow( w, mask, region, d ); } + // Assume desktop windows can never be on two screens at once (Plasma makes one window per screen) + if( w->isDesktop() ) + break; } } else