From ca5337e7318cd2d4e89fcdf90d60b50678f1bead Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 27 Mar 2011 16:36:01 +0200 Subject: [PATCH] naughty: Fix for removal of screen property Signed-off-by: Uli Schlachter --- lib/naughty.lua.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/naughty.lua.in b/lib/naughty.lua.in index 372f95e4..559817a9 100644 --- a/lib/naughty.lua.in +++ b/lib/naughty.lua.in @@ -196,7 +196,7 @@ end -- @param notification Notification object to be destroyed -- @return True if the popup was successfully destroyed, nil otherwise function destroy(notification) - if notification and notification.box.screen then + if notification and notification.box.visible then if suspended then for k, v in pairs(notifications.suspended) do if v.box == notification.box then @@ -205,12 +205,12 @@ function destroy(notification) end end end - local scr = notification.box.screen - table.remove(notifications[notification.box.screen][notification.position], notification.idx) + local scr = notification.screen + table.remove(notifications[scr][notification.position], notification.idx) if notification.timer then notification.timer:stop() end - notification.box.screen = nil + notification.box.visible = false arrange(scr) return true end @@ -305,7 +305,7 @@ function notify(args) local fg = args.fg or preset.fg or beautiful.fg_normal or '#ffffff' local bg = args.bg or preset.bg or beautiful.bg_normal or '#535d6c' local border_color = args.border_color or preset.border_color or beautiful.bg_focus or '#535d6c' - local notification = {} + local notification = { screen = screen } -- replace notification if needed if args.replaces_id then @@ -469,7 +469,7 @@ function notify(args) x = offset.x, y = offset.y }) notification.box.opacity = opacity - notification.box.screen = screen + notification.box.visible = true notification.idx = offset.idx -- populate widgets