all repos — tint2 @ ceb6a44238c18c89b62c49adb967dc2a007c95b5

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

Launcher: fix layout on vertical panels
o9000 mrovi9000@gmail.com
commit

ceb6a44238c18c89b62c49adb967dc2a007c95b5

parent

6a1b2f06107086c55729e5df66b1d4c9c8ac6141

1 files changed, 14 insertions(+), 0 deletions(-)

jump to
M src/launcher/launcher.csrc/launcher/launcher.c

@@ -64,6 +64,8 @@ void launcher_reload_hidden_icons(Launcher *launcher);

void launcher_icon_on_change_layout(void *obj); int launcher_compute_desired_size(void *obj); +void relayout_launcher(); + void default_launcher() { launcher_enabled = 0;

@@ -95,6 +97,7 @@ snprintf(launcher->area.name, sizeof(launcher->area.name), "Launcher");

launcher->area._draw_foreground = NULL; launcher->area.size_mode = LAYOUT_FIXED; launcher->area._resize = resize_launcher; + launcher->area._on_change_layout = relayout_launcher; launcher->area._compute_desired_size = launcher_compute_desired_size; launcher->area.resize_needed = 1; schedule_redraw(&launcher->area);

@@ -323,6 +326,17 @@ ((LauncherIcon *)l->data)->area._is_under_mouse = NULL;

} return TRUE; +} + +void relayout_launcher(void *obj) +{ + Launcher *launcher = (Launcher *)obj; + for (GSList *l = launcher->list_icons; l; l = l->next) { + LauncherIcon *launcherIcon = (LauncherIcon *)l->data; + if (!launcherIcon->area.on_screen) + continue; + launcher_icon_on_change_layout(launcherIcon); + } } // Here we override the default layout of the icons; normally Area layouts its children