diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index 547da80e..f7d1f7b0 100644 --- a/lib/naughty/notification.lua +++ b/lib/naughty/notification.lua @@ -618,6 +618,17 @@ for _, prop in ipairs(properties) do end +-- Changing the image will change the icon, make sure property::icon is emitted. +for _, prop in ipairs {"image", "images" } do + local cur = notification["set_"..prop] + + notification["set_"..prop] = function(self, value) + cur(self, value) + self._private.icon = nil + self:emit_signal("property::icon") + end +end + local hints_default = { urgency = "normal", resident = false,