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.
This commit is contained in:
Daniel Hahler 2015-07-07 13:01:53 +02:00
parent 4f865e66ed
commit ae7c7ff382

View file

@ -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.