mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Use wlroots scene-graph API
Move xdg-shell and xwayland-shell surfaces to new API Also render alt-tab on-screen-display by converting cairo-surface to wlr_buffer
This commit is contained in:
		
							parent
							
								
									d2552232c7
								
							
						
					
					
						commit
						532656ad5b
					
				
					 16 changed files with 189 additions and 1465 deletions
				
			
		| 
						 | 
				
			
			@ -23,6 +23,22 @@ unmanaged_handle_commit(struct wl_listener *listener, void *data)
 | 
			
		|||
	damage_all_outputs(unmanaged->server);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static struct view *
 | 
			
		||||
parent_view(struct server *server, struct wlr_xwayland_surface *surface)
 | 
			
		||||
{
 | 
			
		||||
	struct wlr_xwayland_surface *s = surface;
 | 
			
		||||
	while (s->parent) {
 | 
			
		||||
		s = s->parent;
 | 
			
		||||
	}
 | 
			
		||||
	struct view *view;
 | 
			
		||||
	wl_list_for_each(view, &server->views, link) {
 | 
			
		||||
		if (view->surface == s->surface) {
 | 
			
		||||
			return view;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
unmanaged_handle_map(struct wl_listener *listener, void *data)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -42,6 +58,12 @@ unmanaged_handle_map(struct wl_listener *listener, void *data)
 | 
			
		|||
	if (wlr_xwayland_or_surface_wants_focus(xsurface)) {
 | 
			
		||||
		seat_focus_surface(&unmanaged->server->seat, xsurface->surface);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	struct view *view = parent_view(unmanaged->server, xsurface);
 | 
			
		||||
	struct wlr_scene_node *node = wlr_scene_subsurface_tree_create(
 | 
			
		||||
		view->scene_node, xsurface->surface);
 | 
			
		||||
	wlr_scene_node_set_position(node, unmanaged->lx - view->x,
 | 
			
		||||
		unmanaged->ly - view->y);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue