From d33323be67188eac5a36496f0272ca442761c5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 4 Dec 2006 18:31:36 +0000 Subject: [PATCH] Paint only windows that are visible. svn path=/branches/work/kwin_composite/; revision=610615 --- scene.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scene.cpp b/scene.cpp index b61fbaeb7c..bdbfe37b0a 100644 --- a/scene.cpp +++ b/scene.cpp @@ -286,8 +286,10 @@ QRegion Scene::Window::shape() const bool Scene::Window::isVisible() const { - return true; // TODO there may be transformations, so always true for now - // TODO mapping state? + if( Client* c = dynamic_cast< Client* >( toplevel )) + return c->isShown( true ) && c->isOnCurrentDesktop(); + return true; // Unmanaged is always visible + // TODO there may be transformations, so ignore this for now return !toplevel->geometry() .intersect( QRect( 0, 0, displayWidth(), displayHeight())) .isEmpty();