mirror of
				https://codeberg.org/dwl/dwl-patches.git
				synced 2025-10-31 03:54:19 +00:00 
			
		
		
		
	 9c5d5d85f3
			
		
	
	
		9c5d5d85f3
		
			
		
	
	
	
	
		
			
			Eliminated wiki. Individual patches have a README.md explanation in their own subdirectory. Simplified submission of new patches and maintenance of existing patches. Instructions page (README.md autodisplayed) is now at https://codeberg.org/dwl/dwl-patches/
		
			
				
	
	
		
			37 lines
		
	
	
		
			951 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			951 B
		
	
	
	
		
			Diff
		
	
	
	
	
	
| From 42a66d6e06c38e913766ce625f049fdbc3dd0d12 Mon Sep 17 00:00:00 2001
 | |
| From: Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
 | |
| Date: Sun, 7 Apr 2024 21:10:17 +0200
 | |
| Subject: [PATCH] New client are attached on top of the stack
 | |
| 
 | |
| ---
 | |
|  dwl.c | 13 ++++++++++++-
 | |
|  1 file changed, 12 insertions(+), 1 deletion(-)
 | |
| 
 | |
| diff --git a/dwl.c b/dwl.c
 | |
| index bf763df..c0a3d74 100644
 | |
| --- a/dwl.c
 | |
| +++ b/dwl.c
 | |
| @@ -1605,7 +1605,18 @@ mapnotify(struct wl_listener *listener, void *data)
 | |
|  	c->geom.height += 2 * c->bw;
 | |
|  
 | |
|  	/* Insert this client into client lists. */
 | |
| -	wl_list_insert(&clients, &c->link);
 | |
| +	i = 0;
 | |
| +	wl_list_for_each(w, &clients, link) {
 | |
| +		if (!VISIBLEON(w, selmon) || c->isfloating)
 | |
| +			continue;
 | |
| +		p = w;
 | |
| +		if (++i >= selmon->nmaster)
 | |
| +			break;
 | |
| +	}
 | |
| +	if (i > 0)
 | |
| +		wl_list_insert(&p->link, &c->link);
 | |
| +	else
 | |
| +		wl_list_insert(&clients, &c->link);
 | |
|  	wl_list_insert(&fstack, &c->flink);
 | |
|  
 | |
|  	/* Set initial monitor, tags, floating status, and focus:
 | |
| -- 
 | |
| 2.44.0
 | |
| 
 |