view: Fix positioning of initially-maximized XWayland views

map() in xwayland.c called ssd_create() but did not call
view_apply_maximized_geometry() afterward, resulting in the
decorations being displayed off-screen.

Rather than calling view_apply_maximized_geometry() in more places,
let's reuse the existing call in view_set_decorations(), and extend
ssd_update_geometry() to call ssd_create() when needed.
This commit is contained in:
John Lindgren 2022-11-16 16:46:52 -05:00 committed by Johan Malm
parent 0b6eca097d
commit 2995d0e8e0
3 changed files with 6 additions and 11 deletions

View file

@ -389,10 +389,7 @@ map(struct view *view)
}
if (!view->been_mapped) {
view->ssd.enabled = want_deco(view);
if (view->ssd.enabled) {
ssd_create(view);
}
view_set_decorations(view, want_deco(view));
if (!view->maximized && !view->fullscreen) {
set_initial_position(view);