aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorDaniel Kondor <kondor.dani@gmail.com>2020-10-18 23:14:35 +0800
committerGitHub <noreply@github.com>2020-10-18 17:14:35 +0200
commit36395e5b1c4107d6945213e0c06eaa58d885f97c (patch)
tree8978f9db77b368e5ebed673ce4d3f15a93892255 /include/wlr
parent1ac5257357fdf51b2864149f4896c51afd2eda09 (diff)
foreign-toplevel-management: report parent toplevel
Based on the wlr-protocols PR: https://github.com/swaywm/wlr-protocols/pull/52
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_foreign_toplevel_management_v1.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_foreign_toplevel_management_v1.h b/include/wlr/types/wlr_foreign_toplevel_management_v1.h
index 90d88637..6ea9d47f 100644
--- a/include/wlr/types/wlr_foreign_toplevel_management_v1.h
+++ b/include/wlr/types/wlr_foreign_toplevel_management_v1.h
@@ -50,6 +50,7 @@ struct wlr_foreign_toplevel_handle_v1 {
char *title;
char *app_id;
+ struct wlr_foreign_toplevel_handle_v1 *parent;
struct wl_list outputs; // wlr_foreign_toplevel_v1_output
uint32_t state; // wlr_foreign_toplevel_v1_state
@@ -104,6 +105,12 @@ struct wlr_foreign_toplevel_manager_v1 *wlr_foreign_toplevel_manager_v1_create(
struct wlr_foreign_toplevel_handle_v1 *wlr_foreign_toplevel_handle_v1_create(
struct wlr_foreign_toplevel_manager_v1 *manager);
+/* Destroy the given toplevel handle, sending the closed event to any
+ * client. Also, if the destroyed toplevel is set as a parent of any
+ * other valid toplevel, clients still holding a handle to both are
+ * sent a parent signal with NULL parent. If this is not desired, the
+ * caller should ensure that any child toplevels are destroyed before
+ * the parent. */
void wlr_foreign_toplevel_handle_v1_destroy(
struct wlr_foreign_toplevel_handle_v1 *toplevel);
@@ -126,4 +133,14 @@ void wlr_foreign_toplevel_handle_v1_set_activated(
void wlr_foreign_toplevel_handle_v1_set_fullscreen(
struct wlr_foreign_toplevel_handle_v1* toplevel, bool fullscreen);
+/* Set the parent of a toplevel. If the parent changed from its previous
+ * value, also sends a parent event to all clients that hold handles to
+ * both toplevel and parent (no message is sent to clients that have
+ * previously destroyed their parent handle). NULL is allowed as the
+ * parent, meaning no parent exists. */
+void wlr_foreign_toplevel_handle_v1_set_parent(
+ struct wlr_foreign_toplevel_handle_v1 *toplevel,
+ struct wlr_foreign_toplevel_handle_v1 *parent);
+
+
#endif