Avoid unnecessary and excessive kconfig syncs.

svn path=/trunk/KDE/kdebase/workspace/; revision=476560
This commit is contained in:
Luboš Luňák 2005-11-01 14:17:11 +00:00
parent 00ba722f60
commit 67ba695f34

View file

@ -1026,12 +1026,14 @@ void Workspace::cleanupTemporaryRules()
void Workspace::discardUsedWindowRules( Client* c, bool withdrawn ) void Workspace::discardUsedWindowRules( Client* c, bool withdrawn )
{ {
bool updated = false;
for( QList< Rules* >::Iterator it = rules.begin(); for( QList< Rules* >::Iterator it = rules.begin();
it != rules.end(); it != rules.end();
) )
{ {
if( c->rules()->contains( *it )) if( c->rules()->contains( *it ))
{ {
updated = true;
(*it)->discardUsed( withdrawn ); (*it)->discardUsed( withdrawn );
if( (*it)->isEmpty()) if( (*it)->isEmpty())
{ {
@ -1044,7 +1046,8 @@ void Workspace::discardUsedWindowRules( Client* c, bool withdrawn )
} }
++it; ++it;
} }
rulesUpdated(); if( updated )
rulesUpdated();
} }
void Workspace::rulesUpdated() void Workspace::rulesUpdated()