mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	seat: don't deactivate view for any non-view surface
Now we now longer gray-out the active window when opening a focusable popup menu (e.g. the applications menu from an XWayland panel). This matches Openbox behavior.
This commit is contained in:
		
							parent
							
								
									11cdad0c11
								
							
						
					
					
						commit
						bb8f0bc960
					
				
					 1 changed files with 3 additions and 12 deletions
				
			
		
							
								
								
									
										15
									
								
								src/seat.c
									
										
									
									
									
								
							
							
						
						
									
										15
									
								
								src/seat.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -474,20 +474,11 @@ focus_change_notify(struct wl_listener *listener, void *data)
 | 
			
		|||
	struct wlr_surface *surface = event->new_surface;
 | 
			
		||||
	struct view *view = surface ? view_from_wlr_surface(surface) : NULL;
 | 
			
		||||
 | 
			
		||||
	/* Prevent focus switch to layershell client from updating view state */
 | 
			
		||||
	if (surface && wlr_layer_surface_v1_try_from_wlr_surface(surface)) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * If an xwayland-unmanaged surface was focused belonging to the
 | 
			
		||||
	 * same application as the focused view, allow the view to remain
 | 
			
		||||
	 * active. This fixes an issue with menus immediately closing in
 | 
			
		||||
	 * some X11 apps (try LibreOffice with SAL_USE_VCLPLUGIN=gen).
 | 
			
		||||
	 * Prevent focus switch to non-view surface (e.g. layer-shell
 | 
			
		||||
	 * or xwayland-unmanaged) from updating view state
 | 
			
		||||
	 */
 | 
			
		||||
	if (!view && server->active_view && event->new_surface
 | 
			
		||||
			&& view_is_related(server->active_view,
 | 
			
		||||
				event->new_surface)) {
 | 
			
		||||
	if (surface && !view) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue