mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
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:
parent
4ba62103a6
commit
1560cc3f0b
1 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue