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
This commit is contained in:
parent
98609efbab
commit
693069f7bb
1 changed files with 4 additions and 6 deletions
10
layers.cpp
10
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 );
|
||||
|
|
Loading…
Reference in a new issue