all repos — tint2 @ 394be61a656312d3d2562692a5d519f62ef426c9

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

Collapse executor if output is empty (fixes issue #648)
o9000 mrovi9000@gmail.com
commit

394be61a656312d3d2562692a5d519f62ef426c9

parent

d55f6d7baa56eb8ce8ca2d70a70e6f263b26ee64

1 files changed, 16 insertions(+), 1 deletions(-)

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

@@ -140,7 +140,7 @@ if (!execp->backend->bg)

execp->backend->bg = &g_array_index(backgrounds, Background, 0); execp->backend->buf_capacity = 1024; execp->backend->buf_output = calloc(execp->backend->buf_capacity, 1); - execp->backend->text = strdup(" "); + execp->backend->text = strdup(""); execp->backend->icon_path = NULL; } }

@@ -319,6 +319,21 @@ *icon_w = *icon_h = 0;

} } else { *icon_w = *icon_h = 0; + } + + if ((*icon_h == 0 || *icon_w == 0) && execp->backend->text[0] == 0) { + *new_size = 0; + *txt_height_ink = 0; + *txt_height = 0; + *txt_width = 0; + if (panel_horizontal) { + if (area->width) + *resized = TRUE; + } else { + if (area->height) + *resized = TRUE; + } + return; } *text_next_line = !panel_horizontal && *icon_w > area->width / 2;