mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	xwayland/xwm: rename xwm_map_shell_surface()
Rename xwm_map_shell_surface() to xwayland_surface_associate(). This function doesn't actually "map" the surface in Wayland parlance, the wl_surface may not have a buffer attached yet.
This commit is contained in:
		
							parent
							
								
									c4727240af
								
							
						
					
					
						commit
						d962918128
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -875,7 +875,7 @@ static const struct wlr_surface_role xwayland_surface_role = {
 | 
				
			||||||
	.destroy = xwayland_surface_role_destroy,
 | 
						.destroy = xwayland_surface_role_destroy,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void xwm_map_shell_surface(struct wlr_xwm *xwm,
 | 
					static void xwayland_surface_associate(struct wlr_xwm *xwm,
 | 
				
			||||||
		struct wlr_xwayland_surface *xsurface, struct wlr_surface *surface) {
 | 
							struct wlr_xwayland_surface *xsurface, struct wlr_surface *surface) {
 | 
				
			||||||
	if (!wlr_surface_set_role(surface, &xwayland_surface_role, xsurface,
 | 
						if (!wlr_surface_set_role(surface, &xwayland_surface_role, xsurface,
 | 
				
			||||||
			NULL, 0)) {
 | 
								NULL, 0)) {
 | 
				
			||||||
| 
						 | 
					@ -1112,7 +1112,7 @@ static void xwm_handle_surface_id_message(struct wlr_xwm *xwm,
 | 
				
			||||||
	if (resource) {
 | 
						if (resource) {
 | 
				
			||||||
		struct wlr_surface *surface = wlr_surface_from_resource(resource);
 | 
							struct wlr_surface *surface = wlr_surface_from_resource(resource);
 | 
				
			||||||
		xsurface->surface_id = 0;
 | 
							xsurface->surface_id = 0;
 | 
				
			||||||
		xwm_map_shell_surface(xwm, xsurface, surface);
 | 
							xwayland_surface_associate(xwm, xsurface, surface);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		xsurface->surface_id = id;
 | 
							xsurface->surface_id = id;
 | 
				
			||||||
		wl_list_remove(&xsurface->unpaired_link);
 | 
							wl_list_remove(&xsurface->unpaired_link);
 | 
				
			||||||
| 
						 | 
					@ -1142,7 +1142,7 @@ static void xwm_handle_surface_serial_message(struct wlr_xwm *xwm,
 | 
				
			||||||
	struct wlr_surface *surface = wlr_xwayland_shell_v1_surface_from_serial(
 | 
						struct wlr_surface *surface = wlr_xwayland_shell_v1_surface_from_serial(
 | 
				
			||||||
		xwm->xwayland->shell_v1, xsurface->serial);
 | 
							xwm->xwayland->shell_v1, xsurface->serial);
 | 
				
			||||||
	if (surface != NULL) {
 | 
						if (surface != NULL) {
 | 
				
			||||||
		xwm_map_shell_surface(xwm, xsurface, surface);
 | 
							xwayland_surface_associate(xwm, xsurface, surface);
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		wl_list_remove(&xsurface->unpaired_link);
 | 
							wl_list_remove(&xsurface->unpaired_link);
 | 
				
			||||||
		wl_list_insert(&xwm->unpaired_surfaces, &xsurface->unpaired_link);
 | 
							wl_list_insert(&xwm->unpaired_surfaces, &xsurface->unpaired_link);
 | 
				
			||||||
| 
						 | 
					@ -1672,7 +1672,7 @@ static void handle_compositor_new_surface(struct wl_listener *listener,
 | 
				
			||||||
	struct wlr_xwayland_surface *xsurface;
 | 
						struct wlr_xwayland_surface *xsurface;
 | 
				
			||||||
	wl_list_for_each(xsurface, &xwm->unpaired_surfaces, unpaired_link) {
 | 
						wl_list_for_each(xsurface, &xwm->unpaired_surfaces, unpaired_link) {
 | 
				
			||||||
		if (xsurface->surface_id == surface_id) {
 | 
							if (xsurface->surface_id == surface_id) {
 | 
				
			||||||
			xwm_map_shell_surface(xwm, xsurface, surface);
 | 
								xwayland_surface_associate(xwm, xsurface, surface);
 | 
				
			||||||
			xcb_flush(xwm->xcb_conn);
 | 
								xcb_flush(xwm->xcb_conn);
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					@ -1697,7 +1697,7 @@ static void handle_shell_v1_new_surface(struct wl_listener *listener,
 | 
				
			||||||
	struct wlr_xwayland_surface *xsurface;
 | 
						struct wlr_xwayland_surface *xsurface;
 | 
				
			||||||
	wl_list_for_each(xsurface, &xwm->unpaired_surfaces, unpaired_link) {
 | 
						wl_list_for_each(xsurface, &xwm->unpaired_surfaces, unpaired_link) {
 | 
				
			||||||
		if (xsurface->serial == shell_surface->serial) {
 | 
							if (xsurface->serial == shell_surface->serial) {
 | 
				
			||||||
			xwm_map_shell_surface(xwm, xsurface, shell_surface->surface);
 | 
								xwayland_surface_associate(xwm, xsurface, shell_surface->surface);
 | 
				
			||||||
			return;
 | 
								return;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue