From 26ffd2c6f2e1d8278536bb0252946bef9a781900 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sat, 10 Jan 2015 21:06:30 +0100 Subject: [PATCH] naughty.dbus: Fix the CloseNotification method It was broken when naughty was split up. Thanks to trollixx for reporting this on IRC. Signed-off-by: Uli Schlachter --- lib/naughty/core.lua.in | 4 ++-- lib/naughty/dbus.lua.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/naughty/core.lua.in b/lib/naughty/core.lua.in index e63307d92..e01d42539 100644 --- a/lib/naughty/core.lua.in +++ b/lib/naughty/core.lua.in @@ -224,7 +224,7 @@ end -- Get notification by ID -- @param id ID of the notification -- @return notification object if it was found, nil otherwise -local function getById(id) +function naughty.getById(id) -- iterate the notifications to get the notfications with the correct ID for s = 1, capi.screen.count() do for p,pos in pairs(naughty.notifications[s]) do @@ -308,7 +308,7 @@ function naughty.notify(args) -- replace notification if needed if args.replaces_id then - local obj = getById(args.replaces_id) + local obj = naughty.getById(args.replaces_id) if obj then -- destroy this and ... naughty.destroy(obj, naughty.notificationClosedReason.silent) diff --git a/lib/naughty/dbus.lua.in b/lib/naughty/dbus.lua.in index bba885a1d..4eac95c60 100644 --- a/lib/naughty/dbus.lua.in +++ b/lib/naughty/dbus.lua.in @@ -181,7 +181,7 @@ capi.dbus.connect_signal("org.freedesktop.Notifications", function (data, appnam end return "u", "0" elseif data.member == "CloseNotification" then - local obj = getById(appname) + local obj = naughty.getById(appname) if obj then naughty.destroy(obj, naughty.notificationClosedReason.dismissedByCommand) end