xwayland: center stored natural geometry for initially maximized views

For views that are initially maximized or fullscreen and have no
explicitly specified position, we need to center the stored natural
geometry, or the view may end up partially offscreen once unmaximized/
unfullscreened.
This commit is contained in:
John Lindgren 2023-10-17 23:06:12 -04:00 committed by Johan Malm
parent 45a4b3c047
commit a1324c8cdc
3 changed files with 27 additions and 8 deletions

View file

@ -539,7 +539,7 @@ view_minimize(struct view *view, bool minimized)
minimize_sub_views(root, minimized);
}
static bool
bool
view_compute_centered_position(struct view *view, const struct wlr_box *ref,
int w, int h, int *x, int *y)
{