From e78470b8b28a03139365694a4e9feb07e2cf2091 Mon Sep 17 00:00:00 2001 From: Rivo Laks Date: Sat, 24 Nov 2007 12:10:27 +0000 Subject: [PATCH] Dim only normal windows and dialogs (and optionally docks), not e.g. menus or desktop (not sure about desktop though). svn path=/trunk/KDE/kdebase/workspace/; revision=740917 --- effects/diminactive.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/effects/diminactive.cpp b/effects/diminactive.cpp index 50634e894e..4ec1aca31b 100644 --- a/effects/diminactive.cpp +++ b/effects/diminactive.cpp @@ -31,19 +31,14 @@ DimInactiveEffect::DimInactiveEffect() void DimInactiveEffect::paintWindow( EffectWindow* w, int mask, QRegion region, WindowPaintData& data ) { bool dim = false; - if( active == NULL ) - { - if( !w->isDock() || dim_panels ) - dim = true; - else - dim = false; - } - else if( dim_by_group && active->group() == w->group()) + if( active && dim_by_group && active->group() == w->group()) dim = false; - else if( !dim_by_group && active == w ) + else if( active && !dim_by_group && active == w ) dim = false; else if( w->isDock()) dim = dim_panels; + else if( !w->isNormalWindow() && !w->isDialog()) + dim = false; else dim = true; if( dim )