make the borders red borders for urgent clients

iirc this is the same behavior of dwm
This commit is contained in:
Leonardo Hernández Hernández
2023-10-05 22:13:56 -06:00
parent d63f4078c5
commit 72a7d78a1a
2 changed files with 9 additions and 0 deletions

8
dwl.c
View File

@@ -2589,10 +2589,14 @@ urgent(struct wl_listener *listener, void *data)
{
struct wlr_xdg_activation_v1_request_activate_event *event = data;
Client *c = NULL;
int i;
toplevel_from_wlr_surface(event->surface, &c, NULL);
if (!c || c == focustop(selmon))
return;
for (i = 0; i < 4; i++)
wlr_scene_rect_set_color(c->border[i], urgentcolor);
c->isurgent = 1;
printstatus();
}
@@ -2752,9 +2756,13 @@ void
sethints(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, set_hints);
int i;
if (c == focustop(selmon))
return;
for (i = 0; i < 4; i++)
wlr_scene_rect_set_color(c->border[i], urgentcolor);
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);
printstatus();
}