From f511ad2a67a786ba6a707a3fd34c4cdc6d1a0832 Mon Sep 17 00:00:00 2001 From: o9000 Date: Sat, 2 Jan 2016 11:11:07 +0100 Subject: [PATCH] Some systray fixes --- src/systray/systraybar.c | 10 ++++++++++ src/util/timer.c | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/systray/systraybar.c b/src/systray/systraybar.c index e630185..201b933 100644 --- a/src/systray/systraybar.c +++ b/src/systray/systraybar.c @@ -1189,6 +1189,16 @@ void systray_render_icon_from_image(TrayWindow *traywin) if (!traywin->image) return; imlib_context_set_image(traywin->image); + XCopyArea(server.display, + render_background, + systray.area.pix, + server.gc, + traywin->x - systray.area.posx, + traywin->y - systray.area.posy, + traywin->width, + traywin->height, + traywin->x - systray.area.posx, + traywin->y - systray.area.posy); render_image(systray.area.pix, traywin->x - systray.area.posx, traywin->y - systray.area.posy); } diff --git a/src/util/timer.c b/src/util/timer.c index afe986c..f8e39ce 100644 --- a/src/util/timer.c +++ b/src/util/timer.c @@ -96,6 +96,8 @@ void cleanup_timeout() timeout *add_timeout(int value_msec, int interval_msec, void (*_callback)(void *), void *arg, timeout **self) { + if (self && *self) + return *self; timeout *t = calloc(1, sizeof(timeout)); t->self = self; add_timeout_intern(value_msec, interval_msec, _callback, arg, t);