From ae7c7ff3820d60d906ca5a656560384b76837bbb Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 7 Jul 2015 13:01:53 +0200 Subject: [PATCH] awful.tag: emit property:: signals only on change This can have a significant performance impact in case you listen to the property::hide signal to auto-hide tags for example. --- lib/awful/tag.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/awful/tag.lua b/lib/awful/tag.lua index 46a9ea8d..93ad2ae2 100644 --- a/lib/awful/tag.lua +++ b/lib/awful/tag.lua @@ -598,8 +598,10 @@ function tag.setproperty(_tag, prop, value) if not data.tags[_tag] then data.tags[_tag] = {} end - data.tags[_tag][prop] = value - _tag:emit_signal("property::" .. prop) + if data.tags[_tag][prop] ~= value then + data.tags[_tag][prop] = value + _tag:emit_signal("property::" .. prop) + end end --- Tag a client with the set of current tags.