desktop-shell: Don't reposition windows on every resize

Remove any attempt to reposition windows when handling an output resize.

This had some side-effects on x11 and wayland backends that keep moving
windows at random positions when manually the output.

A more smarter approach would be to move them only if they're actually
affected by a resize -- like no longer in the output's viewing area, but
that remains for another day.

Fixes: #793

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Reported-by: Philipp Zabel <p.zabel@pengutronix.de>
This commit is contained in:
Marius Vlad 2023-08-08 15:21:59 +03:00
parent 3f2ce98278
commit c59a02c15e

View File

@ -4744,19 +4744,6 @@ handle_output_resized_shsurfs(struct desktop_shell *shell)
set_shsurf_size_maximized_or_fullscreen(shsurf,
is_maximized,
is_fullscreen);
continue;
}
if (shsurf->saved_position_valid) {
weston_view_set_position(shsurf->view, shsurf->saved_pos);
shsurf->saved_position_valid = false;
} else {
shsurf->saved_pos =
weston_view_get_pos_offset_global(shsurf->view);
shsurf->saved_position_valid = true;
weston_view_set_initial_position(shsurf->view,
shsurf->shell);
}
}
}