diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-17 08:27:47 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-17 08:27:47 -0500 |
commit | 43896af90fbd6c743be1e54a0659d7c0f89eaa00 (patch) | |
tree | c9d0907dbdc9932b593cf154f4ebce6db5a27e2d /xwayland/xwm.c | |
parent | b40a5f084abeb5530b3a0097c946ba720c897262 (diff) | |
parent | f2698a896085a5a2dd651a7f1d4fb623d567acf4 (diff) |
Merge branch 'master' into modifier-fixes
Diffstat (limited to 'xwayland/xwm.c')
-rw-r--r-- | xwayland/xwm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c index 53aac6a4..dc349ab2 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -96,6 +96,8 @@ static struct wlr_xwayland_surface *wlr_xwayland_surface_create( surface->height = height; surface->override_redirect = override_redirect; wl_list_insert(&xwm->surfaces, &surface->link); + wl_list_init(&surface->children); + wl_list_init(&surface->parent_link); wl_signal_init(&surface->events.destroy); wl_signal_init(&surface->events.request_configure); wl_signal_init(&surface->events.request_move); @@ -215,6 +217,7 @@ static void wlr_xwayland_surface_destroy( } wl_list_remove(&xsurface->link); + wl_list_remove(&xsurface->parent_link); if (xsurface->surface_id) { wl_list_remove(&xsurface->unpaired_link); @@ -305,6 +308,13 @@ static void read_surface_parent(struct wlr_xwm *xwm, xsurface->parent = NULL; } + wl_list_remove(&xsurface->parent_link); + if (xsurface->parent != NULL) { + wl_list_insert(&xsurface->parent->children, &xsurface->parent_link); + } else { + wl_list_init(&xsurface->parent_link); + } + wlr_log(L_DEBUG, "XCB_ATOM_WM_TRANSIENT_FOR: %p", xid); wl_signal_emit(&xsurface->events.set_parent, xsurface); } |