layer-shell-v1: convert to try_from

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
This commit is contained in:
Simon Ser 2023-02-01 20:13:53 +01:00
parent 49cb85ad72
commit f9bd416d41
2 changed files with 14 additions and 18 deletions

View file

@ -139,18 +139,13 @@ uint32_t wlr_layer_surface_v1_configure(struct wlr_layer_surface_v1 *surface,
*/
void wlr_layer_surface_v1_destroy(struct wlr_layer_surface_v1 *surface);
/**
* Returns true if the surface has the layer surface role.
*/
bool wlr_surface_is_layer_surface(struct wlr_surface *surface);
/**
* Get a struct wlr_layer_surface from a struct wlr_surface.
* Asserts that the surface has the layer surface role.
* May return NULL even if the surface has the layer surface role if the
* corresponding layer surface has been destroyed.
*
* Returns NULL if the surface doesn't have the layer surface role or if
* the layer surface has been destroyed.
*/
struct wlr_layer_surface_v1 *wlr_layer_surface_v1_from_wlr_surface(
struct wlr_layer_surface_v1 *wlr_layer_surface_v1_try_from_wlr_surface(
struct wlr_surface *surface);
/**