mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-10-31 03:54:15 +00:00 
			
		
		
		
	Center floating windows
Credits to Benjamin Chausse for fixing this with multiple monitors.
This commit is contained in:
		
							parent
							
								
									960c32a7d8
								
							
						
					
					
						commit
						ba005d4de9
					
				
							
								
								
									
										2
									
								
								dwl.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								dwl.c
									
									
									
									
									
								
							| @ -467,6 +467,8 @@ applyrules(Client *c) | |||||||
| 					mon = m; | 					mon = m; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	c->geom.x = (mon->w.width - c->geom.width) / 2 + mon->m.x; | ||||||
|  | 	c->geom.y = (mon->w.height - c->geom.height) / 2 + mon->m.y; | ||||||
| 	wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]); | 	wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]); | ||||||
| 	setmon(c, mon, newtags); | 	setmon(c, mon, newtags); | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Guido Cella
						Guido Cella