Paint only windows that are visible.

svn path=/branches/work/kwin_composite/; revision=610615
icc-effect-5.14.5
Luboš Luňák 2006-12-04 18:31:36 +00:00
parent fb95cbf6ce
commit d33323be67
1 changed files with 4 additions and 2 deletions

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