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:
parent
4f865e66ed
commit
ae7c7ff382
|
@ -598,9 +598,11 @@ function tag.setproperty(_tag, prop, value)
|
||||||
if not data.tags[_tag] then
|
if not data.tags[_tag] then
|
||||||
data.tags[_tag] = {}
|
data.tags[_tag] = {}
|
||||||
end
|
end
|
||||||
|
if data.tags[_tag][prop] ~= value then
|
||||||
data.tags[_tag][prop] = value
|
data.tags[_tag][prop] = value
|
||||||
_tag:emit_signal("property::" .. prop)
|
_tag:emit_signal("property::" .. prop)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
--- Tag a client with the set of current tags.
|
--- Tag a client with the set of current tags.
|
||||||
-- @param c The client to tag.
|
-- @param c The client to tag.
|
||||||
|
|
Loading…
Reference in New Issue