aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-09-16 20:07:19 -0400
committerTony Crisci <tony@dubstepdish.com>2017-09-16 20:07:19 -0400
commit5b9373a7913d956b6e1aca8370b66d9d59a83351 (patch)
treec45480b3c05547a631ff051a46202639f8cf2b2c
parent2573c429ee62d875ad2480fd29bef775cb33fa32 (diff)
xdg-toplevel-v6 set parent
-rw-r--r--include/wlr/types/wlr_xdg_shell_v6.h1
-rw-r--r--types/wlr_xdg_shell_v6.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/include/wlr/types/wlr_xdg_shell_v6.h b/include/wlr/types/wlr_xdg_shell_v6.h
index 5183abd5..786bf4e6 100644
--- a/include/wlr/types/wlr_xdg_shell_v6.h
+++ b/include/wlr/types/wlr_xdg_shell_v6.h
@@ -53,6 +53,7 @@ struct wlr_xdg_toplevel_v6_state {
struct wlr_xdg_toplevel_v6 {
struct wl_resource *resource;
struct wlr_xdg_surface_v6 *base;
+ struct wlr_xdg_surface_v6 *parent;
bool added;
struct wlr_xdg_toplevel_v6_state next; // client protocol requests
struct wlr_xdg_toplevel_v6_state pending; // user configure requests
diff --git a/types/wlr_xdg_shell_v6.c b/types/wlr_xdg_shell_v6.c
index f09cba8f..9f503b1f 100644
--- a/types/wlr_xdg_shell_v6.c
+++ b/types/wlr_xdg_shell_v6.c
@@ -21,7 +21,14 @@ static void resource_destroy(struct wl_client *client,
static void xdg_toplevel_protocol_set_parent(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *parent_resource) {
- wlr_log(L_DEBUG, "TODO: toplevel set parent");
+ struct wlr_xdg_surface_v6 *surface = wl_resource_get_user_data(resource);
+ struct wlr_xdg_surface_v6 *parent = NULL;
+
+ if (parent_resource != NULL) {
+ parent = wl_resource_get_user_data(parent_resource);
+ }
+
+ surface->toplevel_state->parent = parent;
}
static void xdg_toplevel_protocol_set_title(struct wl_client *client,