diff --git a/lib/naughty/notification.lua b/lib/naughty/notification.lua index fd13beb5..c2bfa04c 100644 --- a/lib/naughty/notification.lua +++ b/lib/naughty/notification.lua @@ -439,7 +439,11 @@ end function notification:reset_timeout(new_timeout) if self.timer then self.timer:stop() end - self.timeout = new_timeout or self.timeout + -- Do not set `self.timeout` to `self.timeout` since that would create the + -- timer before the constructor ends. + if new_timeout and self.timer then + self.timeout = new_timeout or self.timeout + end if self.timer and not self.timer.started then self.timer:start()