xwayland: render children window in fullscreen

This commit is contained in:
emersion 2018-01-14 18:19:37 +01:00
parent ce3a48c316
commit 65b28b3823
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 43 additions and 8 deletions

View file

@ -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);
}