From c02969bb0e139b57471c546156f247af3bda9466 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 29 Nov 2015 12:33:13 +0100 Subject: [PATCH] wibox.widget.systray: Also emit redraw_needed When emitting layout_changed, the widget is relayouted. If this doesn't actually change anything, nothing will be redrawn. Thus, this also emits redraw_needed to force redraws. This fixes a race condition with some weird tray icons. A new tray icon is created and the systray is updated. Then this new icon is destroyed immediately again and at the same time another icon is created. Then, the systray isn't updated since the number of icons (=the layout) did not actually change. However, it needs to be updated and so we ended up with broken/missing icons. Fixes: https://github.com/awesomeWM/awesome/issues/487 Signed-off-by: Uli Schlachter --- lib/wibox/widget/systray.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/wibox/widget/systray.lua b/lib/wibox/widget/systray.lua index 7fae865d1..e3ecdd042 100644 --- a/lib/wibox/widget/systray.lua +++ b/lib/wibox/widget/systray.lua @@ -84,6 +84,7 @@ local function new(revers) capi.awesome.connect_signal("systray::update", function() ret:emit_signal("widget::layout_changed") + ret:emit_signal("widget::redraw_needed") end) return ret