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 <liang.zhou@gehealthcare.com>
This commit is contained in:
liang zhou 2025-07-22 15:12:41 +08:00 committed by Marius Vlad
parent 4ba62103a6
commit 1560cc3f0b

View file

@ -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);