mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix clicking workspace buttons
Because node_at_coords was returning the workspace's node, it interpreted this as clicking the focused workspace which was a no op.
This commit is contained in:
		
							parent
							
								
									3cc7de3fb4
								
							
						
					
					
						commit
						6f71749398
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -91,7 +91,7 @@ static struct sway_node *node_at_coords(
 | 
				
			||||||
	if ((*surface = layer_surface_at(output,
 | 
						if ((*surface = layer_surface_at(output,
 | 
				
			||||||
				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
 | 
									&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
 | 
				
			||||||
				ox, oy, sx, sy))) {
 | 
									ox, oy, sx, sy))) {
 | 
				
			||||||
		return &ws->node;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (ws->fullscreen) {
 | 
						if (ws->fullscreen) {
 | 
				
			||||||
		struct sway_container *con =
 | 
							struct sway_container *con =
 | 
				
			||||||
| 
						 | 
					@ -104,7 +104,7 @@ static struct sway_node *node_at_coords(
 | 
				
			||||||
	if ((*surface = layer_surface_at(output,
 | 
						if ((*surface = layer_surface_at(output,
 | 
				
			||||||
				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
 | 
									&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
 | 
				
			||||||
				ox, oy, sx, sy))) {
 | 
									ox, oy, sx, sy))) {
 | 
				
			||||||
		return &ws->node;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct sway_container *c;
 | 
						struct sway_container *c;
 | 
				
			||||||
| 
						 | 
					@ -115,12 +115,12 @@ static struct sway_node *node_at_coords(
 | 
				
			||||||
	if ((*surface = layer_surface_at(output,
 | 
						if ((*surface = layer_surface_at(output,
 | 
				
			||||||
				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
 | 
									&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
 | 
				
			||||||
				ox, oy, sx, sy))) {
 | 
									ox, oy, sx, sy))) {
 | 
				
			||||||
		return &ws->node;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if ((*surface = layer_surface_at(output,
 | 
						if ((*surface = layer_surface_at(output,
 | 
				
			||||||
				&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
 | 
									&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
 | 
				
			||||||
				ox, oy, sx, sy))) {
 | 
									ox, oy, sx, sy))) {
 | 
				
			||||||
		return &ws->node;
 | 
							return NULL;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return &ws->node;
 | 
						return &ws->node;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue