aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2022-01-08 22:52:52 +0300
committerKirill Primak <vyivel@eclair.cafe>2022-02-02 21:06:12 +0300
commit41412cadbef34e0c5d2f25e6b874c1ad4540ff01 (patch)
treec5334c4c8278d02675148c88ca3d0d97e2ba3535 /include
parentaffe0d8713a7070844ed4d7558d02785e60ffd10 (diff)
xdg-popup: fix functions' main argument type
With this commit, `wlr_xdg_popup_*()` functions now expect a `wlr_xdg_popup` instead of a `wlr_xdg_surface`.
Diffstat (limited to 'include')
-rw-r--r--include/types/wlr_xdg_shell.h2
-rw-r--r--include/wlr/types/wlr_xdg_shell.h10
2 files changed, 9 insertions, 3 deletions
diff --git a/include/types/wlr_xdg_shell.h b/include/types/wlr_xdg_shell.h
index e3688a94..f4e1ebe3 100644
--- a/include/types/wlr_xdg_shell.h
+++ b/include/types/wlr_xdg_shell.h
@@ -30,7 +30,7 @@ struct wlr_xdg_positioner_resource *get_xdg_positioner_from_resource(
void create_xdg_popup(struct wlr_xdg_surface *xdg_surface,
struct wlr_xdg_surface *parent,
struct wlr_xdg_positioner_resource *positioner, uint32_t id);
-void handle_xdg_surface_popup_committed(struct wlr_xdg_surface *surface);
+void handle_xdg_popup_committed(struct wlr_xdg_popup *popup);
struct wlr_xdg_popup_grab *get_xdg_shell_popup_grab_from_seat(
struct wlr_xdg_shell *shell, struct wlr_seat *seat);
diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h
index e16d3218..736861e2 100644
--- a/include/wlr/types/wlr_xdg_shell.h
+++ b/include/wlr/types/wlr_xdg_shell.h
@@ -265,7 +265,13 @@ struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display);
*/
struct wlr_xdg_surface *wlr_xdg_surface_from_resource(
struct wl_resource *resource);
-struct wlr_xdg_surface *wlr_xdg_surface_from_popup_resource(
+
+/** Get the corresponding wlr_xdg_popup from a resource.
+ *
+ * Aborts if the resource doesn't have the correct type. Returns NULL if the
+ * resource is inert.
+ */
+struct wlr_xdg_popup *wlr_xdg_popup_from_resource(
struct wl_resource *resource);
/** Get the corresponding wlr_xdg_toplevel from a resource.
@@ -339,7 +345,7 @@ void wlr_xdg_toplevel_set_parent(struct wlr_xdg_toplevel *toplevel,
/**
* Request that this xdg popup closes.
**/
-void wlr_xdg_popup_destroy(struct wlr_xdg_surface *surface);
+void wlr_xdg_popup_destroy(struct wlr_xdg_popup *popup);
/**
* Get the position for this popup in the surface parent's coordinate system.