mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-11-03 09:01:45 -05:00 
			
		
		
		
	
							parent
							
								
									7a343b98cf
								
							
						
					
					
						commit
						a7f77160d1
					
				
					 1 changed files with 11 additions and 9 deletions
				
			
		
							
								
								
									
										2
									
								
								dwl.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								dwl.c
									
										
									
									
									
								
							| 
						 | 
					@ -383,6 +383,7 @@ struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
applybounds(Client *c, struct wlr_box *bbox)
 | 
					applybounds(Client *c, struct wlr_box *bbox)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						if (!c->isfullscreen) {
 | 
				
			||||||
		struct wlr_box min = {0}, max = {0};
 | 
							struct wlr_box min = {0}, max = {0};
 | 
				
			||||||
		client_get_size_hints(c, &max, &min);
 | 
							client_get_size_hints(c, &max, &min);
 | 
				
			||||||
		/* try to set size hints */
 | 
							/* try to set size hints */
 | 
				
			||||||
| 
						 | 
					@ -392,6 +393,7 @@ applybounds(Client *c, struct wlr_box *bbox)
 | 
				
			||||||
			c->geom.width = MIN(max.width + (2 * c->bw), c->geom.width);
 | 
								c->geom.width = MIN(max.width + (2 * c->bw), c->geom.width);
 | 
				
			||||||
		if (max.height > 0 && !(2 * c->bw > INT_MAX - max.height)) // Checks for overflow
 | 
							if (max.height > 0 && !(2 * c->bw > INT_MAX - max.height)) // Checks for overflow
 | 
				
			||||||
			c->geom.height = MIN(max.height + (2 * c->bw), c->geom.height);
 | 
								c->geom.height = MIN(max.height + (2 * c->bw), c->geom.height);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (c->geom.x >= bbox->x + bbox->width)
 | 
						if (c->geom.x >= bbox->x + bbox->width)
 | 
				
			||||||
		c->geom.x = bbox->x + bbox->width - c->geom.width;
 | 
							c->geom.x = bbox->x + bbox->width - c->geom.width;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue