mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-02-18 22:05:57 -05:00
xdg_shell: configure surface on initial commit
Instead of waiting for the surface to be mapped before sending a configure event, do it on initial commit. Note, wlroots 0.18 no longer sends automatic configure events on initial commit.
This commit is contained in:
parent
8b0b69c113
commit
ca4b8c065b
3 changed files with 24 additions and 2 deletions
8
view.c
8
view.c
|
|
@ -67,7 +67,9 @@ view_maximize(struct cg_view *view, struct wlr_box *layout_box)
|
|||
view->lx = layout_box->x;
|
||||
view->ly = layout_box->y;
|
||||
|
||||
wlr_scene_node_set_position(&view->scene_tree->node, view->lx, view->ly);
|
||||
if (view->scene_tree) {
|
||||
wlr_scene_node_set_position(&view->scene_tree->node, view->lx, view->ly);
|
||||
}
|
||||
|
||||
view->impl->maximize(view, layout_box->width, layout_box->height);
|
||||
}
|
||||
|
|
@ -81,7 +83,9 @@ view_center(struct cg_view *view, struct wlr_box *layout_box)
|
|||
view->lx = (layout_box->width - width) / 2;
|
||||
view->ly = (layout_box->height - height) / 2;
|
||||
|
||||
wlr_scene_node_set_position(&view->scene_tree->node, view->lx, view->ly);
|
||||
if (view->scene_tree) {
|
||||
wlr_scene_node_set_position(&view->scene_tree->node, view->lx, view->ly);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue