awful.client.property.set: emit property:: signals only on change
Emit "propery::" signals and call `c:set_xproperty` only if the properties new value has changed.
This commit is contained in:
parent
ae7c7ff382
commit
bd885f59f5
|
@ -937,11 +937,13 @@ function client.property.set(c, prop, value)
|
||||||
if not client.data.properties[c] then
|
if not client.data.properties[c] then
|
||||||
client.data.properties[c] = {}
|
client.data.properties[c] = {}
|
||||||
end
|
end
|
||||||
|
if client.data.properties[c][prop] ~= value then
|
||||||
if client.data.persistent_properties_registered[prop] then
|
if client.data.persistent_properties_registered[prop] then
|
||||||
c:set_xproperty("awful.client.property." .. prop, value)
|
c:set_xproperty("awful.client.property." .. prop, value)
|
||||||
end
|
end
|
||||||
client.data.properties[c][prop] = value
|
client.data.properties[c][prop] = value
|
||||||
c:emit_signal("property::" .. prop)
|
c:emit_signal("property::" .. prop)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set a client property to be persistent across restarts (via X properties).
|
--- Set a client property to be persistent across restarts (via X properties).
|
||||||
|
|
Loading…
Reference in New Issue