diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-01 20:12:49 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-02-01 20:12:49 +0100 |
commit | 711a1a3ed42150fdbc716e80719d482006075f69 (patch) | |
tree | cb6715f30608362eac2408a6061e338eba31f657 /include | |
parent | 03412e9aaba3f2bedacbeeef53469f13d6b6b277 (diff) |
xdg-shell: convert to try_from
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_xdg_shell.h | 14 |
1 files changed, 4 insertions, 10 deletions
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 @@ -481,18 +481,12 @@ struct wlr_surface *wlr_xdg_surface_popup_surface_at( 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. |