Skip to content

Notifications with default timeout don't disappear (with naughty.list.notifications) #3239

@robn

Description

@robn

Output of awesome --version:

awesome v4.3-897-g66b1780d (Too long)
 • Compiled against Lua 5.3.3 (running with Lua 5.3)
 • API level: 4
 • D-Bus support: yes
 • xcb-errors support: no
 • execinfo support: yes
 • xcb-randr version: 1.6
 • LGI version: 0.9.2
 • Transparency enabled: yes
 • Custom search paths: no

How to reproduce the issue:

Actual result:

The first notification disappears after 2 seconds.

The second notification never disappears.

Expected result:

When no explicit expiry timeout is set, the notification should disappear after the default timeout (5 seconds).

More info

If I add this to my rc.lua:

naughty.connect_signal('added', function(n)
    print(n:get_timeout())
end)

It shows the timeout on the notification is set to the default of 5. This suggests something is wrong with its setup. To confirm this, I made this patch:

diff --git a/lib/naughty/dbus.lua a/lib/naughty/dbus.lua
index 98b36a7f..2eea8b94 100644
--- a/lib/naughty/dbus.lua
+++ a/lib/naughty/dbus.lua
@@ -278,6 +278,8 @@ function notif_methods.Notify(sender, object_path, interface, method, parameters
         end
         if expire and expire > -1 then
             args.timeout = expire / 1000
+        else
+            args.timeout = 5
         end
 
         args.freedesktop_hints = hints

With this in place, the notifications disappear.

My guess; the timer for new notifications is being created before the default timeout is set, so it sees "no timeout" and doesn't set up. I haven't been able to follow the code well enough to confirm that, let alone fix it, but there it is.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions