make the borders red borders for urgent clients
iirc this is the same behavior of dwm
This commit is contained in:
		
							
								
								
									
										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();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user