all repos — tint2 @ 8c9a9a111ed4a377a336fd799cd7f7e3182a09e6

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

systray: trigger resizes in some places
o9000 o9000
commit

8c9a9a111ed4a377a336fd799cd7f7e3182a09e6

parent

b13540123b070b081f9daab50f1fd992f71f5754

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

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

@@ -503,6 +503,7 @@ systray.area.resize = 1;

systray.area.redraw = 1; panel->area.resize = 1; panel_refresh = 1; + refresh_systray = 1; return TRUE; }

@@ -622,6 +623,8 @@ }

void remove_icon(TrayWindow *traywin) { + Panel* panel = systray.area.panel; + // remove from our list systray.list_icons = g_slist_remove(systray.list_icons, traywin); printf("remove_icon: %lu\n", traywin->win);

@@ -654,13 +657,18 @@ }

if (count == 0) hide(&systray.area); - // changed in systray + // Resize and redraw the systray systray.area.resize = 1; + systray.area.redraw = 1; + panel->area.resize = 1; panel_refresh = 1; + refresh_systray = 1; } void systray_reconfigure_event(TrayWindow *traywin) { + Panel* panel = systray.area.panel; + //printf("move tray %d\n", traywin->x); XMoveResizeWindow(server.dsp, traywin->parent, traywin->x, traywin->y, traywin->width, traywin->height); if (traywin->reparented) {

@@ -669,6 +677,10 @@ // Trigger window repaint

stop_timeout(traywin->render_timeout); traywin->render_timeout = add_timeout(50, 0, systray_render_icon, traywin, &traywin->render_timeout); } + // Resize and redraw the systray + systray.area.resize = 1; + systray.area.redraw = 1; + panel->area.resize = 1; panel_refresh = 1; refresh_systray = 1; }

@@ -821,9 +833,13 @@ goto on_error;

if (traywin->empty != empty) { traywin->empty = empty; + systray.list_icons = g_slist_sort(systray.list_icons, compare_traywindows); + // Resize and redraw the systray systray.area.resize = 1; + systray.area.redraw = 1; + panel->area.resize = 1; panel_refresh = 1; - systray.list_icons = g_slist_sort(systray.list_icons, compare_traywindows); + refresh_systray = 1; } return;