all repos — tint2 @ 66a6238014f43f0c5225af1795e7675392ab53c9

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

fix crash in single-monitor execp
Chris Lee @klee93
commit

66a6238014f43f0c5225af1795e7675392ab53c9

parent

5e8c65b87ea7c90add2712ed983621833c5fe6a4

2 files changed, 8 insertions(+), 2 deletions(-)

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

@@ -66,7 +66,8 @@ execp_backend->backend->command,

execp_backend->backend->monitor, panel->monitor); Execp *dummy = create_execp(); dummy->frontend = (ExecpFrontend *)calloc(1, sizeof(ExecpFrontend)); - dummy->backend->instances = g_list_append(execp_backend->backend->instances, dummy); + dummy->backend->instances = g_list_append(dummy->backend->instances, dummy); + dummy->dummy = true; return dummy; } printf("Creating executor '%s' with monitor %d for panel on monitor %d\n",

@@ -89,7 +90,11 @@ execp->backend->instances = g_list_remove_all(execp->backend->instances, execp);

free_and_null(execp->frontend); remove_area(&execp->area); free_area(&execp->area); - free_and_null(execp); + if (execp->dummy) { + destroy_execp(execp); + } else { + free_and_null(execp); + } } else { // This is a backend element destroy_timer(&execp->backend->timer);
M src/execplugin/execplugin.hsrc/execplugin/execplugin.h

@@ -97,6 +97,7 @@ // All elements have the backend pointer set. However only backend elements have ownership.

ExecpBackend *backend; // Set only for frontend Execp items. ExecpFrontend *frontend; + bool dummy; } Execp; // Called before the config is read and panel_config/panels are created.