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
This commit is contained in:
Ben Collerson 2023-10-10 16:42:46 +10:00 committed by Leonardo Hernández Hernández
parent df131cdb78
commit 8c79f8dc15
No known key found for this signature in database
GPG Key ID: E538897EE11B9624

3
dwl.c
View File

@ -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();
}