diff --git a/src/panel.c b/src/panel.c index 9170a87..f8e46c8 100644 --- a/src/panel.c +++ b/src/panel.c @@ -1083,6 +1083,7 @@ void shrink_panel(Panel *panel) systray.area.resize_needed = TRUE; schedule_redraw(&systray.area); refresh_systray = TRUE; + update_minimized_icon_positions(panel); } } diff --git a/src/taskbar/taskbar.c b/src/taskbar/taskbar.c index e2dcedc..44e01e9 100644 --- a/src/taskbar/taskbar.c +++ b/src/taskbar/taskbar.c @@ -674,3 +674,18 @@ void sort_taskbar_for_win(Window win) } } } + +void update_minimized_icon_positions(void *p) +{ + Panel *panel = (Panel *)p; + for (int i = 0; i < panel->num_desktops; i++) { + Taskbar *taskbar = &panel->taskbar[i]; + if (!taskbar->area.on_screen) + continue; + for (GList *c = taskbar->area.children; c; c = c->next) { + Area *area = (Area *)c->data; + if (area->_on_change_layout) + area->_on_change_layout(area); + } + } +} diff --git a/src/taskbar/taskbar.h b/src/taskbar/taskbar.h index e7d7d82..7827936 100644 --- a/src/taskbar/taskbar.h +++ b/src/taskbar/taskbar.h @@ -88,6 +88,8 @@ void set_taskbar_state(Taskbar *taskbar, TaskbarState state); // Updates the visibility of all taskbars void update_all_taskbars_visibility(); +void update_minimized_icon_positions(void *p); + // Sorts the taskbar(s) on which the window is present. void sort_taskbar_for_win(Window win);