mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 05:38:05 +02:00
compositor: when unmapping a surface remove it from the compositor's list
compositor.surface_list is recreated every redraw with the mapped surfaces, but if a surface gets unmapped and then in the same frame weston_compositor_pick_surface() is called we must make sure it does not pick the unmapped surface, since it traverses the surface_list to find one. If after the unmap the surface gets also deleted it's even more important, as it must not pick a destroyed surface.
This commit is contained in:
parent
eeefc9e311
commit
4df790e505
1 changed files with 2 additions and 0 deletions
|
|
@ -1054,6 +1054,8 @@ weston_surface_unmap(struct weston_surface *surface)
|
|||
weston_surface_damage_below(surface);
|
||||
surface->output = NULL;
|
||||
wl_list_remove(&surface->layer_link);
|
||||
wl_list_remove(&surface->link);
|
||||
wl_list_init(&surface->link);
|
||||
|
||||
wl_list_for_each(seat, &surface->compositor->seat_list, link) {
|
||||
if (seat->keyboard && seat->keyboard->focus == surface)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue