mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
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
1 changed files with 4 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue