mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-30 19:44:17 +00:00 
			
		
		
		
	add colors for sticky patch
This commit is contained in:
		
							parent
							
								
									34ac3849c3
								
							
						
					
					
						commit
						7208380841
					
				
							
								
								
									
										23
									
								
								dwl.c
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								dwl.c
									
									
									
									
									
								
							| @ -1496,8 +1496,13 @@ focusclient(Client *c, int lift) | |||||||
| 
 | 
 | ||||||
| 		/* Don't change border color if there is an exclusive focus or we are
 | 		/* Don't change border color if there is an exclusive focus or we are
 | ||||||
| 		 * handling a drag operation */ | 		 * handling a drag operation */ | ||||||
| 		if (!exclusive_focus && !seat->drag) | 		if (!exclusive_focus && !seat->drag) { | ||||||
| 			client_set_border_color(c, focuscolor); | 			if (c->issticky) { | ||||||
|  | 				client_set_border_color(c, mixedcolor); | ||||||
|  | 			} | ||||||
|  | 			else | ||||||
|  | 				client_set_border_color(c, focuscolor); | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/* Deactivate old client if focus is changing */ | 	/* Deactivate old client if focus is changing */ | ||||||
| @ -1514,7 +1519,10 @@ focusclient(Client *c, int lift) | |||||||
| 		/* Don't deactivate old client if the new one wants focus, as this causes issues with winecfg
 | 		/* Don't deactivate old client if the new one wants focus, as this causes issues with winecfg
 | ||||||
| 		 * and probably other clients */ | 		 * and probably other clients */ | ||||||
| 		} else if (old_c && !client_is_unmanaged(old_c) && (!c || !client_wants_focus(c))) { | 		} else if (old_c && !client_is_unmanaged(old_c) && (!c || !client_wants_focus(c))) { | ||||||
| 			client_set_border_color(old_c, bordercolor); | 			if (old_c->issticky) | ||||||
|  | 				client_set_border_color(old_c, stickycolor); | ||||||
|  | 			else | ||||||
|  | 				client_set_border_color(old_c, bordercolor); | ||||||
| 
 | 
 | ||||||
| 			client_activate_surface(old, 0); | 			client_activate_surface(old, 0); | ||||||
| 		} | 		} | ||||||
| @ -2884,6 +2892,15 @@ togglesticky(const Arg *arg) | |||||||
| 	if (!sel) | 	if (!sel) | ||||||
| 		return; | 		return; | ||||||
| 	sel->issticky = !sel->issticky; | 	sel->issticky = !sel->issticky; | ||||||
|  | 
 | ||||||
|  | 	if (sel->issticky) { | ||||||
|  | 		client_set_border_color(sel, mixedcolor); | ||||||
|  | 	} else { | ||||||
|  | 		client_set_border_color(sel, focuscolor); | ||||||
|  | 		if (!VISIBLEON(sel, selmon)) | ||||||
|  | 			focusclient(focustop(selmon, 0), 1); | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	arrange(selmon); | 	arrange(selmon); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 korei999
						korei999