summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Collerson <benc@benc.cc>2023-10-10 16:42:46 +1000
committerLeonardo Hernández Hernández <leohdz172@proton.me>2023-10-10 10:16:11 -0600
commit8c79f8dc155ba696572be30ee8c2ddfc577ae418 (patch)
tree0ef92f63d8aeb774002512b59d9f78dd66137a67
parentdf131cdb78c6e3e79c3fafa522f0e4f6b43d2ab4 (diff)
check client is mapped before setting border color
For some reason brave configured for as a wayland client triggers this code on startup and segfaults. Checking if the client is mapped fixes this, like with the previous fix for urgent border colour. References: 887fde65a3010905aa10f373cfcfe540cfc1781e Fixes: 72a7d78a1a7926a207539eb50f44b2e1eb089d49
-rw-r--r--dwl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 4cfa4db..a7d41b0 100644
--- a/dwl.c
+++ b/dwl.c
@@ -2593,7 +2593,8 @@ urgent(struct wl_listener *listener, void *data)
if (!c || c == focustop(selmon))
return;
- client_set_border_color(c, urgentcolor);
+ if (client_is_mapped(c))
+ client_set_border_color(c, urgentcolor);
c->isurgent = 1;
printstatus();
}