From c59a02c15e6fd4c9771645838c48cadc1c642a79 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 8 Aug 2023 15:21:59 +0300 Subject: [PATCH] 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 Reported-by: Philipp Zabel --- desktop-shell/shell.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index f90c92d0..16563f74 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -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); } } }