forked from mirror/dwl
make the borders red borders for urgent clients
iirc this is the same behavior of dwm
This commit is contained in:
parent
d63f4078c5
commit
72a7d78a1a
2 changed files with 9 additions and 0 deletions
|
@ -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 */
|
||||
|
||||
|
|
8
dwl.c
8
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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue