Fix executor verbosity (issue #699)
Chris Lee @klee93
4 files changed,
10 insertions(+),
1 deletions(-)
M
src/execplugin/execplugin.c
→
src/execplugin/execplugin.c
@@ -20,6 +20,8 @@ #include "common.h"
#define MAX_TOOLTIP_LEN 4096 +bool debug_executors = false; + void execp_timer_callback(void *arg); char *execp_get_tooltip(void *obj); void execp_init_fonts();@@ -635,7 +637,8 @@ close(pipe_fd_stderr[1]);
close(pipe_fd_stderr[0]); return; } else if (child == 0) { - fprintf(stderr, "tint2: Executing: %s\n", execp->backend->command); + if (debug_executors) + fprintf(stderr, "tint2: Executing: %s\n", execp->backend->command); // We are in the child close(pipe_fd_stdout[0]); dup2(pipe_fd_stdout[1], 1); // 1 is stdout
M
src/execplugin/execplugin.h
→
src/execplugin/execplugin.h
@@ -8,6 +8,8 @@ #include "area.h"
#include "common.h" #include "timer.h" +extern bool debug_executors; + // Architecture: // Panel panel_config contains an array of Execp, each storing all config options and all the state variables. // Only these run commands.
M
src/init.c
→
src/init.c
@@ -106,6 +106,7 @@ debug_frames = getenv("DEBUG_FRAMES") != NULL;
debug_dnd = getenv("DEBUG_DND") != NULL; debug_thumbnails = getenv("DEBUG_THUMBNAILS") != NULL; debug_timers = getenv("DEBUG_TIMERS") != NULL; + debug_executors = getenv("DEBUG_EXECUTORS") != NULL; if (debug_fps) { init_fps_distribution(); char *s = getenv("TRACING_FPS_THRESHOLD");