mirror of
				https://github.com/labwc/labwc.git
				synced 2025-10-29 05:40:24 -04:00 
			
		
		
		
	xwayland-unmanaged: focus parent surface on unmap
Re-focus on parent surface if it is available
Fixes #352 relating to JetBrains and Intellij focus issues
Backport of 61675b521c
			
			
This commit is contained in:
		
							parent
							
								
									65e158e4c1
								
							
						
					
					
						commit
						9b593e4715
					
				
					 1 changed files with 11 additions and 0 deletions
				
			
		|  | @ -56,6 +56,17 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data) | |||
| 
 | ||||
| 	struct seat *seat = &unmanaged->server->seat; | ||||
| 	if (seat->seat->keyboard_state.focused_surface == xsurface->surface) { | ||||
| 		/*
 | ||||
| 		 * Try to focus on parent surface | ||||
| 		 * This seems to fix JetBrains/Intellij window focus issues | ||||
| 		 */ | ||||
| 		if (xsurface->parent && xsurface->parent->surface | ||||
| 				&& wlr_xwayland_or_surface_wants_focus(xsurface->parent)) { | ||||
| 			seat_focus_surface(seat, xsurface->parent->surface); | ||||
| 			return; | ||||
| 		} | ||||
| 
 | ||||
| 		/* Try to focus on last created unmanaged xwayland surface */ | ||||
| 		struct xwayland_unmanaged *u; | ||||
| 		struct wl_list *list = &unmanaged->server->unmanaged_surfaces; | ||||
| 		wl_list_for_each (u, list, link) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jelle De Loecker
						Jelle De Loecker