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
parent 59e1fc62ea
commit 7f76375c67
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);
/**