Merge pull request #3519 from HumblePresent/fix_notif_register

Apply presets before registering notification
This commit is contained in:
Aire-One 2021-12-09 21:11:17 +01:00 committed by GitHub
commit 70524e72fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1029,14 +1029,14 @@ local function create(args)
n.id = n.id or notification._gen_next_id()
-- Register the notification before requesting a widget
n:emit_signal("new", args)
-- The rules are attached to this.
if naughty._has_preset_handler then
naughty.emit_signal("request::preset", n, "new", args)
end
-- Register the notification before requesting a widget
n:emit_signal("new", args)
-- Let all listeners handle the actual visual aspects
if (not n.ignore) and ((not n.preset) or n.preset.ignore ~= true) and (not get_suspended(n)) then
naughty.emit_signal("request::display" , n, "new", args)