diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index 87fad12d5..7a03d6309 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -284,7 +284,7 @@ local function resume() v._private.args = nil naughty.emit_signal("added", v, args) - naughty.emit_signal("request::display", v, args) + naughty.emit_signal("request::display", v, "resume", args) if v.timer then v.timer:start() end end naughty.notifications.suspended = { } @@ -540,6 +540,7 @@ naughty.connect_signal("request::screen", naughty.default_screen_handler) -- end) -- -- @tparam table notification The `naughty.notification` object. +-- @tparam string context Why is the signal sent. -- @tparam table args Any arguments passed to the `naughty.notify` function, -- including, but not limited to, all `naughty.notification` properties. -- @signal request::display @@ -547,6 +548,7 @@ naughty.connect_signal("request::screen", naughty.default_screen_handler) --- Emitted when a notification needs pre-display configuration. -- -- @tparam table notification The `naughty.notification` object. +-- @tparam string context Why is the signal sent. -- @tparam table args Any arguments passed to the `naughty.notify` function, -- including, but not limited to, all `naughty.notification` properties. -- @signal request::preset diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index f72d3227a..547da80ef 100644 --- a/lib/naughty/notification.lua +++ b/lib/naughty/notification.lua @@ -942,13 +942,13 @@ local function create(args) -- The rules are attached to this. if naughty._has_preset_handler then - naughty.emit_signal("request::preset", n, args) + naughty.emit_signal("request::preset", n, "new", args) end -- Let all listeners handle the actual visual aspects if (not n.ignore) and ((not n.preset) or n.preset.ignore ~= true) then - naughty.emit_signal("request::display" , n, args) - naughty.emit_signal("request::fallback", n, args) + naughty.emit_signal("request::display" , n, "new", args) + naughty.emit_signal("request::fallback", n, "new", args) end -- Because otherwise the setter logic would not be executed