all repos — tint2 @ 7c87ab88bc6036b1e112d6615d72db7a14c5e787

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

Reexecute on SIGUSR2
o9000 mrovi9000@gmail.com
commit

7c87ab88bc6036b1e112d6615d72db7a14c5e787

parent

b87470a284123d3789f8dffab54e2269ff963ca3

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

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

@@ -463,6 +463,7 @@ sigaction(SIGCHLD, &sa_chld, 0);

struct sigaction sa = {.sa_handler = signal_handler, .sa_flags = SA_RESTART}; sigaction(SIGUSR1, &sa, 0); + sigaction(SIGUSR2, &sa, 0); sigaction(SIGINT, &sa, 0); sigaction(SIGTERM, &sa, 0); sigaction(SIGHUP, &sa, 0);

@@ -2177,6 +2178,12 @@ fprintf(stderr, YELLOW "%s %d: restarting tint2..." RESET "\n", __FILE__, __LINE__);

// restart tint2 // SIGUSR1 used when : user's signal, composite manager stop/start or xrandr goto start; + } else if (signal_pending == SIGUSR2) { + fprintf(stderr, YELLOW "%s %d: reexecuting tint2..." RESET "\n", __FILE__, __LINE__); + if (execvp(argv[0], argv) == -1) { + fprintf(stderr, RED "%s %d: failed!" RESET "\n", __FILE__, __LINE__); + return 1; + } } else { // SIGINT, SIGTERM, SIGHUP exit(0);