Avoid unnecessary and excessive kconfig syncs.
svn path=/trunk/KDE/kdebase/workspace/; revision=476560
This commit is contained in:
parent
00ba722f60
commit
67ba695f34
1 changed files with 4 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue