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

@ -337,6 +337,8 @@ void view_move(struct view *view, int x, int y);
void view_move_to_cursor(struct view *view);
void view_moved(struct view *view);
void view_minimize(struct view *view, bool minimized);
bool view_compute_centered_position(struct view *view,
const struct wlr_box *ref, int w, int h, int *x, int *y);
void view_store_natural_geometry(struct view *view);
/**