From 67ba695f34c828f7473d7630085c25516a3b9d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 1 Nov 2005 14:17:11 +0000 Subject: [PATCH] Avoid unnecessary and excessive kconfig syncs. svn path=/trunk/KDE/kdebase/workspace/; revision=476560 --- rules.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rules.cpp b/rules.cpp index 66d28f29f0..6e93610a3a 100644 --- a/rules.cpp +++ b/rules.cpp @@ -1026,12 +1026,14 @@ void Workspace::cleanupTemporaryRules() void Workspace::discardUsedWindowRules( Client* c, bool withdrawn ) { + bool updated = false; for( QList< Rules* >::Iterator it = rules.begin(); it != rules.end(); ) { if( c->rules()->contains( *it )) { + updated = true; (*it)->discardUsed( withdrawn ); if( (*it)->isEmpty()) { @@ -1044,7 +1046,8 @@ void Workspace::discardUsedWindowRules( Client* c, bool withdrawn ) } ++it; } - rulesUpdated(); + if( updated ) + rulesUpdated(); } void Workspace::rulesUpdated()