mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	cursor: prevent press on layer-subsurface from cancelling popup grab
Fixes: #1030
This commit is contained in:
		
							parent
							
								
									be1ef03412
								
							
						
					
					
						commit
						a89bcc3c60
					
				
					 3 changed files with 7 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -922,8 +922,12 @@ cursor_button_press(struct seat *seat, struct wlr_pointer_button_event *event)
 | 
			
		|||
			seat_set_focus_layer(seat, layer);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if (ctx.type == LAB_SSD_LAYER_SUBSURFACE) {
 | 
			
		||||
		seat_focus_surface(seat, ctx.surface);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (ctx.type != LAB_SSD_CLIENT && wlr_seat_pointer_has_grab(seat->seat)) {
 | 
			
		||||
	if (ctx.type != LAB_SSD_CLIENT && ctx.type != LAB_SSD_LAYER_SUBSURFACE
 | 
			
		||||
			&& wlr_seat_pointer_has_grab(seat->seat)) {
 | 
			
		||||
		/*
 | 
			
		||||
		 * If we have an active popup grab (an open popup) we want to
 | 
			
		||||
		 * cancel that grab whenever the user presses on anything that
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -423,6 +423,7 @@ get_cursor_context(struct server *server)
 | 
			
		|||
					 * setting the margin with the pointer.
 | 
			
		||||
					 */
 | 
			
		||||
					ret.surface = surface;
 | 
			
		||||
					ret.type = LAB_SSD_LAYER_SUBSURFACE;
 | 
			
		||||
					return ret;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue