mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix mouse_warping
This commit is contained in:
		
							parent
							
								
									26204441b4
								
							
						
					
					
						commit
						2aa6afae54
					
				
					 1 changed files with 14 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -709,8 +709,15 @@ void seat_set_focus_warp(struct sway_seat *seat, struct sway_node *node,
 | 
			
		|||
		}
 | 
			
		||||
 | 
			
		||||
		if (config->mouse_warping && warp && new_output != last_output) {
 | 
			
		||||
				double x = container->x + container->width / 2.0;
 | 
			
		||||
				double y = container->y + container->height / 2.0;
 | 
			
		||||
			double x = 0;
 | 
			
		||||
			double y = 0;
 | 
			
		||||
			if (container) {
 | 
			
		||||
				x = container->x + container->width / 2.0;
 | 
			
		||||
				y = container->y + container->height / 2.0;
 | 
			
		||||
			} else {
 | 
			
		||||
				x = new_workspace->x + new_workspace->width / 2.0;
 | 
			
		||||
				y = new_workspace->y + new_workspace->height / 2.0;
 | 
			
		||||
			}
 | 
			
		||||
			if (!wlr_output_layout_contains_point(root->output_layout,
 | 
			
		||||
					new_output->wlr_output, seat->cursor->cursor->x,
 | 
			
		||||
					seat->cursor->cursor->y)) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue