all repos — tint2 @ b235f77f3976cc306f35c85fd1343b380511d4c0

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

systray: Prevent triggering concurrent updates for the same icon
o9000 o9000
commit

b235f77f3976cc306f35c85fd1343b380511d4c0

parent

1b4b0a8d8dc99b93d942b2f2bc3391c5827bd495

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M src/systray/systraybar.csrc/systray/systraybar.c

@@ -613,13 +613,17 @@ return;

} traywin->time_last_render.tv_sec = now.tv_sec; traywin->time_last_render.tv_nsec = now.tv_nsec; - traywin->render_timeout = NULL; if ( traywin->width == 0 || traywin->height == 0 ) { // reschedule rendering since the geometry information has not yet been processed (can happen on slow cpu) - systray_render_icon(traywin); + traywin->render_timeout = add_timeout(50, 0, systray_render_icon_now, traywin, &traywin->render_timeout); return; } + + if (traywin->render_timeout) { + stop_timeout(traywin->render_timeout); + traywin->render_timeout = NULL; + } int empty = 1; XImage *ximage = XGetImage(server.dsp, traywin->tray_id, 0, 0, traywin->width, traywin->height, AllPlanes, XYPixmap);