mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Remove wlr_xdg_surface_send_close.
This commit is contained in:
		
							parent
							
								
									8134d5b1e0
								
							
						
					
					
						commit
						e7fff4f560
					
				
					 3 changed files with 20 additions and 19 deletions
				
			
		| 
						 | 
					@ -296,9 +296,14 @@ uint32_t wlr_xdg_toplevel_set_tiled(struct wlr_xdg_surface *surface,
 | 
				
			||||||
		uint32_t tiled_edges);
 | 
							uint32_t tiled_edges);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Request that this xdg surface closes.
 | 
					 * Request that this xdg toplevel closes.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
void wlr_xdg_surface_send_close(struct wlr_xdg_surface *surface);
 | 
					void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Request that this xdg popup closes.
 | 
				
			||||||
 | 
					 **/
 | 
				
			||||||
 | 
					void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Get the geometry for this positioner based on the anchor rect, gravity, and
 | 
					 * Get the geometry for this positioner based on the anchor rect, gravity, and
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -248,9 +248,9 @@ static void close(struct roots_view *view) {
 | 
				
			||||||
	struct wlr_xdg_surface *surface = view->xdg_surface;
 | 
						struct wlr_xdg_surface *surface = view->xdg_surface;
 | 
				
			||||||
	struct wlr_xdg_popup *popup = NULL;
 | 
						struct wlr_xdg_popup *popup = NULL;
 | 
				
			||||||
	wl_list_for_each(popup, &surface->popups, link) {
 | 
						wl_list_for_each(popup, &surface->popups, link) {
 | 
				
			||||||
		wlr_xdg_surface_send_close(popup->base);
 | 
							wlr_xdg_popup_destroy(popup->base);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	wlr_xdg_surface_send_close(surface);
 | 
						wlr_xdg_toplevel_send_close(surface);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void destroy(struct roots_view *view) {
 | 
					static void destroy(struct roots_view *view) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -517,22 +517,18 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
 | 
				
			||||||
		surface->client->ping_serial);
 | 
							surface->client->ping_serial);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wlr_xdg_surface_send_close(struct wlr_xdg_surface *surface) {
 | 
					void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
 | 
				
			||||||
	switch (surface->role) {
 | 
						if (surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL
 | 
				
			||||||
	case WLR_XDG_SURFACE_ROLE_NONE:
 | 
							&& surface->toplevel) {
 | 
				
			||||||
		assert(0 && "not reached");
 | 
					 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	case WLR_XDG_SURFACE_ROLE_TOPLEVEL:
 | 
					 | 
				
			||||||
		if (surface->toplevel) {
 | 
					 | 
				
			||||||
		xdg_toplevel_send_close(surface->toplevel->resource);
 | 
							xdg_toplevel_send_close(surface->toplevel->resource);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
		break;
 | 
					}
 | 
				
			||||||
	case WLR_XDG_SURFACE_ROLE_POPUP:
 | 
					
 | 
				
			||||||
		if (surface->popup) {
 | 
					void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface) {
 | 
				
			||||||
 | 
						if (surface->role == WLR_XDG_SURFACE_ROLE_POPUP
 | 
				
			||||||
 | 
							&& surface->popup) {
 | 
				
			||||||
		xdg_popup_send_popup_done(surface->popup->resource);
 | 
							xdg_popup_send_popup_done(surface->popup->resource);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
		break;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void xdg_popup_get_position(struct wlr_xdg_popup *popup,
 | 
					static void xdg_popup_get_position(struct wlr_xdg_popup *popup,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue