From 78a31324a071bbbc61c3963f730688befa5c2bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 30 Oct 2003 18:12:23 +0000 Subject: [PATCH] Make unobscuredRegion() ignore windows that cannot be visible on the same virtual desktop like the window. Prevent B2's titlebars affecting each other if they're on different virtual desktops. svn path=/trunk/kdebase/kwin/; revision=263255 --- bridge.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bridge.cpp b/bridge.cpp index 330c44b2fd..037ffbe257 100644 --- a/bridge.cpp +++ b/bridge.cpp @@ -136,6 +136,18 @@ QRegion Bridge::unobscuredRegion( const QRegion& r ) const it != stacking_order.end(); ++it ) { + if( !(*it)->isShown( true )) + continue; // these don't obscure the window + if( c->isOnAllDesktops()) + { + if( !(*it)->isOnCurrentDesktop()) + continue; + } + else + { + if( !(*it)->isOnDesktop( c->desktop())) + continue; + } /* the clients all have their mask-regions in local coords so we have to translate them to a shared coord system we choose ours */