mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Take window borders into account when resizing floating windows
Otherwise the borders can be resized to smaller than the minimum window size.
This commit is contained in:
		
							parent
							
								
									44b2d3ad81
								
							
						
					
					
						commit
						65302093cf
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -73,6 +73,12 @@ static void handle_motion(struct sway_seat *seat, uint32_t time_msec,
 | 
				
			||||||
		height = fmax(view_min_height, fmin(height, view_max_height));
 | 
							height = fmax(view_min_height, fmin(height, view_max_height));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						struct sway_container_state *state = &con->current;
 | 
				
			||||||
 | 
						width += state->border_thickness * 2;
 | 
				
			||||||
 | 
						height += config->titlebar_border_thickness * 2;
 | 
				
			||||||
 | 
						height += container_titlebar_height();
 | 
				
			||||||
 | 
						height += config->titlebar_v_padding;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Recalculate these, in case we hit a min/max limit
 | 
						// Recalculate these, in case we hit a min/max limit
 | 
				
			||||||
	grow_width = width - e->ref_width;
 | 
						grow_width = width - e->ref_width;
 | 
				
			||||||
	grow_height = height - e->ref_height;
 | 
						grow_height = height - e->ref_height;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue