From eb3e8f08a8bb17f9b6260015b901cacbb9b0ce94 Mon Sep 17 00:00:00 2001
From: Simon Ser <contact@emersion.fr>
Date: Wed, 1 Feb 2023 20:14:39 +0100
Subject: subcompositor: convert to try_from

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
---
 include/wlr/types/wlr_subcompositor.h | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

(limited to 'include')

diff --git a/include/wlr/types/wlr_subcompositor.h b/include/wlr/types/wlr_subcompositor.h
index afbff45b..c292ea0c 100644
--- a/include/wlr/types/wlr_subcompositor.h
+++ b/include/wlr/types/wlr_subcompositor.h
@@ -62,18 +62,13 @@ struct wlr_subcompositor {
 	} events;
 };
 
-/**
- * Returns true if the surface has the subsurface role.
- */
-bool wlr_surface_is_subsurface(struct wlr_surface *surface);
-
 /**
  * Get a struct wlr_subsurface from a struct wlr_surface.
- * Asserts that the surface has the subsurface role.
- * May return NULL even if the surface has the subsurface role if the
- * corresponding subsurface has been destroyed.
+ *
+ * Returns NULL if the surface doesn't have the subsurface role or if
+ * the subsurface has been destroyed.
  */
-struct wlr_subsurface *wlr_subsurface_from_wlr_surface(
+struct wlr_subsurface *wlr_subsurface_try_from_wlr_surface(
 	struct wlr_surface *surface);
 
 struct wlr_subcompositor *wlr_subcompositor_create(struct wl_display *display);
-- 
cgit v1.2.3