all repos — tint2 @ 2570ae2cf629e57940f7ae29bd239bc64c019e61

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

systray: Resize icons only if necessary
o9000 o9000
commit

2570ae2cf629e57940f7ae29bd239bc64c019e61

parent

8d5c2d8cbbae0425d12c87bb0f9723fc8f836041

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

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

@@ -761,13 +761,17 @@ traywin->win, traywin->name, e->xconfigure.x, e->xconfigure.y, e->xconfigure.width, e->xconfigure.height);

Panel* panel = systray.area.panel; //fprintf(stderr, "move tray %d\n", traywin->x); - XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height); - if (traywin->reparented) { - XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); - // Trigger window repaint - stop_timeout(traywin->render_timeout); - traywin->render_timeout = add_timeout(min_refresh_period, 0, systray_render_icon, traywin, &traywin->render_timeout); + + if (e->xconfigure.width != traywin->width || e->xconfigure.height != traywin->height || e->xconfigure.x != 0 || e->xconfigure.y != 0) { + XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height); + if (traywin->reparented) { + XMoveResizeWindow(server.dsp, traywin->win, 0, 0, traywin->width, traywin->height); + // Trigger window repaint + stop_timeout(traywin->render_timeout); + traywin->render_timeout = add_timeout(min_refresh_period, 0, systray_render_icon, traywin, &traywin->render_timeout); + } } + // Resize and redraw the systray if (systray_profile) fprintf(stderr, BLUE "[%f] %s:%d trigger resize & redraw\n" RESET, profiling_get_time(), __FUNCTION__, __LINE__);