From 1560cc3f0b1b600f05ad73717a4151085a7053fd Mon Sep 17 00:00:00 2001 From: liang zhou Date: Tue, 22 Jul 2025 15:12:41 +0800 Subject: [PATCH] compositor: prevent crash when moving view with popup on first output removal In a multi-screen setup, removing the first screen triggers `handle_output_move`. If `weston_view_set_position` is called on an output that has an active popup, it causes a weston crash due to the view has a parent. Signed-off-by: liang zhou --- desktop-shell/shell.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 97db5c50a..8bc23a6ed 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -4575,6 +4575,12 @@ handle_output_move_layer(struct desktop_shell *shell, if (view->output != output) continue; + /* We can't simply reposition popups and such, they must move with + * the parent. + */ + if (view->geometry.parent) + continue; + pos = weston_coord_global_add( weston_view_get_pos_offset_global(view), output->move);