mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Stop floaters from snapping on move to new output
This commit is contained in:
		
							parent
							
								
									d6a5dfc913
								
							
						
					
					
						commit
						11c1619f30
					
				
					 1 changed files with 12 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -216,6 +216,7 @@ static void arrange_workspace(struct sway_container *workspace) {
 | 
			
		|||
	// Adjust any floating containers
 | 
			
		||||
	double diff_x = workspace->x - prev_x;
 | 
			
		||||
	double diff_y = workspace->y - prev_y;
 | 
			
		||||
	if (diff_x != 0 || diff_y != 0) {
 | 
			
		||||
		for (int i = 0; i < workspace->sway_workspace->floating->length; ++i) {
 | 
			
		||||
			struct sway_container *floater =
 | 
			
		||||
				workspace->sway_workspace->floating->items[i];
 | 
			
		||||
| 
						 | 
				
			
			@ -228,6 +229,7 @@ static void arrange_workspace(struct sway_container *workspace) {
 | 
			
		|||
				container_floating_move_to_center(floater);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	workspace_add_gaps(workspace);
 | 
			
		||||
	container_set_dirty(workspace);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue