...and take into account output layout co-ordinates.
Previously xdg-shell views were just positioned at (0, 0) on first map
regardless of output co-ordinates.
Fix issue #39
position_xdg_toplevel_view(struct view *view)
{
if (istopmost(view)) {
- /*
- * For topmost xdg-toplevel, we just top/left align for the
- * time being
- */
- view->x = view->y = 0;
+ view->w = view->xdg_surface->geometry.width;
+ view->h = view->xdg_surface->geometry.height;
+ view_center(view);
} else {
/*
* If child-toplevel-views, we center-align relative to their
parent_link) {
subsurface_create(view, subsurface);
}
+ view->been_mapped = true;
}
- view->been_mapped = true;
view->commit.notify = handle_commit;
wl_signal_add(&view->xdg_surface->surface->events.commit,