From 711a1a3ed42150fdbc716e80719d482006075f69 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 1 Feb 2023 20:12:49 +0100 Subject: xdg-shell: convert to try_from References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884 --- include/wlr/types/wlr_xdg_shell.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index d017a2ae..d1072d0d 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -480,19 +480,13 @@ struct wlr_surface *wlr_xdg_surface_popup_surface_at( struct wlr_xdg_surface *surface, double sx, double sy, double *sub_x, double *sub_y); -/** - * Returns true if the surface has the xdg surface role. - */ -bool wlr_surface_is_xdg_surface(struct wlr_surface *surface); - /** * Get a struct wlr_xdg_surface from a struct wlr_surface. - * Asserts that the surface has the xdg surface role. - * May return NULL even if the surface has the xdg surface role if the - * corresponding xdg surface has been destroyed. + * + * Returns NULL if the surface doesn't have the xdg_surface role or + * if the xdg_surface has been destroyed. */ -struct wlr_xdg_surface *wlr_xdg_surface_from_wlr_surface( - struct wlr_surface *surface); +struct wlr_xdg_surface *wlr_xdg_surface_try_from_wlr_surface(struct wlr_surface *surface); /** * Get the surface geometry. -- cgit v1.2.3