awful.widget.graph: setters: emit widget::updated only on changes
Ref: #284
This commit is contained in:
parent
3be423fcb3
commit
4a845ced0f
|
@ -224,8 +224,10 @@ end
|
||||||
for _, prop in ipairs(properties) do
|
for _, prop in ipairs(properties) do
|
||||||
if not graph["set_" .. prop] then
|
if not graph["set_" .. prop] then
|
||||||
graph["set_" .. prop] = function(_graph, value)
|
graph["set_" .. prop] = function(_graph, value)
|
||||||
|
if data[_graph][prop] ~= value then
|
||||||
data[_graph][prop] = value
|
data[_graph][prop] = value
|
||||||
_graph:emit_signal("widget::updated")
|
_graph:emit_signal("widget::updated")
|
||||||
|
end
|
||||||
return _graph
|
return _graph
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue