From a049d66dd7907aabdaf4724a723cd79e1fa9cda7 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Sun, 4 Sep 2022 14:01:55 +0300 Subject: xdg-toplevel: send invalid_parent error --- include/wlr/types/wlr_xdg_shell.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index 90371282..db1d7bd5 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -418,9 +418,11 @@ void wlr_xdg_toplevel_send_close(struct wlr_xdg_toplevel *toplevel); /** * Sets the parent of this toplevel. Parent can be NULL. + * + * Returns true on success, false if setting the parent would create a loop. */ -void wlr_xdg_toplevel_set_parent(struct wlr_xdg_toplevel *toplevel, - struct wlr_xdg_toplevel *parent); +bool wlr_xdg_toplevel_set_parent(struct wlr_xdg_toplevel *toplevel, + struct wlr_xdg_toplevel *parent); /** * Request that this popup closes. -- cgit v1.2.3