From 7fb6883cac2103978a4b5308b3cbadec233409f7 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Tue, 9 Jul 2019 01:35:03 -0400 Subject: [PATCH] notifications: Send more signals when changing an action. If the action own `notification` object changes, also emit the signal on the old one. --- lib/naughty/action.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/naughty/action.lua b/lib/naughty/action.lua index 17d7874f..dcd23409 100644 --- a/lib/naughty/action.lua +++ b/lib/naughty/action.lua @@ -103,6 +103,16 @@ for _, prop in ipairs { "name", "icon", "notification", "icon_only" } do end end +local set_notif = action.set_notification + +function action.set_notification(self, value) + local old = self._private.notification + set_notif(self, value) + if old then + old:emit_signal("property::actions") + end +end + --- Execute this action. -- -- This only emits the `invoked` signal.