xdg-toplevel-v6 set parent

This commit is contained in:
Tony Crisci 2017-09-16 20:07:19 -04:00
parent 2573c429ee
commit 5b9373a791
2 changed files with 9 additions and 1 deletions

View file

@ -53,6 +53,7 @@ struct wlr_xdg_toplevel_v6_state {
struct wlr_xdg_toplevel_v6 { struct wlr_xdg_toplevel_v6 {
struct wl_resource *resource; struct wl_resource *resource;
struct wlr_xdg_surface_v6 *base; struct wlr_xdg_surface_v6 *base;
struct wlr_xdg_surface_v6 *parent;
bool added; bool added;
struct wlr_xdg_toplevel_v6_state next; // client protocol requests struct wlr_xdg_toplevel_v6_state next; // client protocol requests
struct wlr_xdg_toplevel_v6_state pending; // user configure requests struct wlr_xdg_toplevel_v6_state pending; // user configure requests

View file

@ -21,7 +21,14 @@ static void resource_destroy(struct wl_client *client,
static void xdg_toplevel_protocol_set_parent(struct wl_client *client, static void xdg_toplevel_protocol_set_parent(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *parent_resource) { 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, static void xdg_toplevel_protocol_set_title(struct wl_client *client,