xdg: Fix positioning of initially-maximized views

- Don't overwrite pending size in map() if it was already set
- Don't reposition view in map() if maximized/fullscreen

Also, as future-proofing in case we one day allow initially-tiled views,
replace explicit maximized/fullscreen checks with view_is_floating().
This commit is contained in:
John Lindgren 2023-02-09 16:06:07 -05:00 committed by Consolatis
parent a1b5e1939d
commit db1d6fa308
2 changed files with 10 additions and 5 deletions

View file

@ -534,7 +534,7 @@ map(struct view *view)
if (!view->been_mapped) {
view_set_decorations(view, want_deco(xwayland_surface));
if (!view->maximized && !view->fullscreen) {
if (view_is_floating(view)) {
set_initial_position(view, xwayland_surface);
}
@ -549,7 +549,7 @@ map(struct view *view)
view->been_mapped = true;
}
if (view->ssd_enabled && !view->fullscreen && !view->maximized) {
if (view->ssd_enabled && view_is_floating(view)) {
top_left_edge_boundary_check(view);
}