Paint only windows that are visible.

svn path=/branches/work/kwin_composite/; revision=610615
This commit is contained in:
Luboš Luňák 2006-12-04 18:31:36 +00:00
parent fb95cbf6ce
commit d33323be67

View file

@ -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();