From 693069f7bb502d2a2f0e8b905b1545300963eb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 12 Jan 2005 12:30:34 +0000 Subject: [PATCH] Avoid infinite loop if somebody decides to use window-specific settings to force being kept both above and below. svn path=/trunk/kdebase/kwin/; revision=377750 --- layers.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/layers.cpp b/layers.cpp index a8a87c6ead..7bbaac1558 100644 --- a/layers.cpp +++ b/layers.cpp @@ -650,10 +650,9 @@ void Client::restackWindow( Window /*above TODO */, int detail, NET::RequestSour void Client::setKeepAbove( bool b ) { b = rules()->checkKeepAbove( b ); - if( b ) + if( b && !rules()->checkKeepBelow( false )) setKeepBelow( false ); - if ( b == keepAbove() - || ( b && keepBelow())) // forced below + if ( b == keepAbove()) { // force hint change if different if( bool( info->state() & NET::KeepAbove ) != keepAbove()) info->setState( keepAbove() ? NET::KeepAbove : 0, NET::KeepAbove ); @@ -670,10 +669,9 @@ void Client::setKeepAbove( bool b ) void Client::setKeepBelow( bool b ) { b = rules()->checkKeepBelow( b ); - if( b ) + if( b && !rules()->checkKeepAbove( false )) setKeepAbove( false ); - if ( b == keepBelow() - || ( b && keepAbove())) // forced above + if ( b == keepBelow()) { // force hint change if different if( bool( info->state() & NET::KeepBelow ) != keepBelow()) info->setState( keepBelow() ? NET::KeepBelow : 0, NET::KeepBelow );