summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h1
-rw-r--r--dwl.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/config.def.h b/config.def.h
index f4c3cae..895284f 100644
--- a/config.def.h
+++ b/config.def.h
@@ -9,6 +9,7 @@ static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will
static const unsigned int borderpx = 1; /* border pixel of windows */
static const float bordercolor[] = COLOR(0x444444ff);
static const float focuscolor[] = COLOR(0x005577ff);
+static const float urgentcolor[] = COLOR(0xff0000ff);
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0}; /* You can also use glsl colors */
diff --git a/dwl.c b/dwl.c
index b51614d..87f0636 100644
--- a/dwl.c
+++ b/dwl.c
@@ -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();
}