From 1cab753316cb7737e9cbfdea06df6df636a999f9 Mon Sep 17 00:00:00 2001 From: Ethan Marshall Date: Wed, 10 Aug 2022 23:25:04 +0100 Subject: Fix bar clicking Freeze v1 inadvertently blocked the signal which was delivered when clicking. Do not block this signal while redrawing. Instead, only explicitly block real time signals. --- dwmblocks.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dwmblocks.c b/dwmblocks.c index fb56d95..c2e1477 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -185,9 +185,9 @@ void setroot() { /* block all signals until after root updated */ sigset_t new, old; - sigfillset(&new); - sigdelset(&new, SIGINT); - sigdelset(&new, SIGTERM); + for (unsigned int i = SIGRTMIN; i <= SIGRTMAX; i++) { + sigaddset(&new, i); + } if (sigprocmask(SIG_SETMASK, &new, &old) < 0) { perror("sigset"); -- cgit v1.2.3 From 2e2e95ac36b7b9cfa0ae886aced43c9b4b9dba91 Mon Sep 17 00:00:00 2001 From: Ethan Marshall Date: Wed, 10 Aug 2022 23:26:03 +0100 Subject: Explicitly zero signal mask --- dwmblocks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dwmblocks.c b/dwmblocks.c index c2e1477..0186eff 100644 --- a/dwmblocks.c +++ b/dwmblocks.c @@ -188,8 +188,9 @@ void setroot() for (unsigned int i = SIGRTMIN; i <= SIGRTMAX; i++) { sigaddset(&new, i); } + sigemptyset(&old); - if (sigprocmask(SIG_SETMASK, &new, &old) < 0) { + if (sigprocmask(SIG_SETMASK, &new, NULL) < 0) { perror("sigset"); exit(1); } -- cgit v1.2.3