diff --git a/lib/naughty/dbus.lua.in b/lib/naughty/dbus.lua.in index 4eac95c6..0c6e69b9 100644 --- a/lib/naughty/dbus.lua.in +++ b/lib/naughty/dbus.lua.in @@ -47,17 +47,21 @@ dbus.config.mapping = { } local function sendActionInvoked(notificationId, action) - capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", - "org.freedesktop.Notifications", "ActionInvoked", - "i", notificationId, - "s", action) + if capi.dbus then + capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", + "org.freedesktop.Notifications", "ActionInvoked", + "i", notificationId, + "s", action) + end end local function sendNotificationClosed(notificationId, reason) - capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", - "org.freedesktop.Notifications", "NotificationClosed", - "i", notificationId, - "i", reason) + if capi.dbus then + capi.dbus.emit_signal("session", "/org/freedesktop/Notifications", + "org.freedesktop.Notifications", "NotificationClosed", + "i", notificationId, + "i", reason) + end end local function convert_icon(w, h, rowstride, channels, data)