Revert "dbus: fix nil notifications (#2180)"

This reverts commit 7519c6966a.
This commit is contained in:
Emmanuel Lepage Vallee 2019-01-01 16:46:36 -05:00
parent 74ef4dd8b7
commit 3e70e87796
2 changed files with 2 additions and 10 deletions

View File

@ -411,12 +411,6 @@ function naughty.getById(id)
end
end
--- Increase notification ID by one
function naughty.get_next_notification_id()
counter = counter + 1
return counter
end
--- Install expiration timer for notification object.
-- @tparam notification notification Notification object.
-- @tparam number timeout Time in seconds to be set as expiration timeout.

View File

@ -191,11 +191,9 @@ capi.dbus.connect_signal("org.freedesktop.Notifications",
end
args.freedesktop_hints = hints
notification = naughty.notify(args)
if notification ~= nil then
return "u", notification.id
end
return "u", notification.id
end
return "u", naughty.get_next_notification_id()
return "u", "0"
elseif data.member == "CloseNotification" then
local obj = naughty.getById(appname)
if obj then