Log info about why a panel restart was triggered
o9000 mrovi9000@gmail.com
1 files changed,
8 insertions(+),
3 deletions(-)
jump to
M
src/tint.c
→
src/tint.c
@@ -1161,6 +1161,7 @@ }
// change in root window (xrandr) if (win == server.root_win) { + fprintf(stderr, YELLOW "%s %d: triggering tint2 restart due to configuration change in the root window\n" RESET, __FILE__, __LINE__); signal_pending = SIGUSR1; return; }@@ -1685,7 +1686,7 @@
case DestroyNotify: if (e.xany.window == server.composite_manager) { // Stop real_transparency - fprintf(stderr, "Detected compositor shutdown, restarting tint2...\n"); + fprintf(stderr, YELLOW "%s %d: triggering tint2 restart due to compositor shutdown\n" RESET, __FILE__, __LINE__); signal_pending = SIGUSR1; break; }@@ -1702,12 +1703,15 @@
case ClientMessage: { XClientMessageEvent *ev = &e.xclient; if (ev->data.l[1] == server.atom._NET_WM_CM_S0) { - if (ev->data.l[2] == None) + if (ev->data.l[2] == None) { // Stop real_transparency + fprintf(stderr, YELLOW "%s %d: triggering tint2 restart due to change in transparency\n" RESET, __FILE__, __LINE__); signal_pending = SIGUSR1; - else + } else { // Start real_transparency + fprintf(stderr, YELLOW "%s %d: triggering tint2 restart due to change in transparency\n" RESET, __FILE__, __LINE__); signal_pending = SIGUSR1; + } } if (systray_enabled && e.xclient.message_type == server.atom._NET_SYSTEM_TRAY_OPCODE && e.xclient.format == 32 && e.xclient.window == net_sel_win) {@@ -1859,6 +1863,7 @@
if (signal_pending) { cleanup(); if (signal_pending == SIGUSR1) { + fprintf(stderr, YELLOW "%s %d: restarting tint2...\n" RESET, __FILE__, __LINE__); // restart tint2 // SIGUSR1 used when : user's signal, composite manager stop/start or xrandr goto start;