From d5b652973ff7acac7189eb4b97f4b3e668178f05 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sat, 7 Mar 2020 20:35:33 -0500 Subject: [PATCH] naughty: Emit `property::icon` when the `image` or `images` change. This way updating the icon at least *can* work. --- lib/naughty/notification.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index 547da80ef..f7d1f7b01 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,