compositor: Don't remove surface->link in weston_surface_unmap()
Expecting the link to be initialized breaks when compositor-drm.c takes surfaces out of the list. We could fix that to also wl_list_init() the link, but we're moving to making the surface list local to weston_output_repaint(), rebuilt in and only valid during weston_output_repaint() so just don't touch it instead.
This commit is contained in:
@@ -658,14 +658,8 @@ weston_surface_unmap(struct weston_surface *surface)
|
|||||||
|
|
||||||
weston_surface_damage_below(surface);
|
weston_surface_damage_below(surface);
|
||||||
surface->output = NULL;
|
surface->output = NULL;
|
||||||
wl_list_remove(&surface->link);
|
|
||||||
wl_list_remove(&surface->layer_link);
|
wl_list_remove(&surface->layer_link);
|
||||||
|
|
||||||
/* If a surface is mapped and unmapped before a repaint occurs, it
|
|
||||||
* won't be added to the compositor's surface list, so make sure the
|
|
||||||
* call to wl_list_remove(&surface->link) won't fail next time */
|
|
||||||
wl_list_init(&surface->link);
|
|
||||||
|
|
||||||
wl_list_for_each(seat, &surface->compositor->seat_list, link) {
|
wl_list_for_each(seat, &surface->compositor->seat_list, link) {
|
||||||
if (seat->seat.keyboard &&
|
if (seat->seat.keyboard &&
|
||||||
seat->seat.keyboard->focus == &surface->surface)
|
seat->seat.keyboard->focus == &surface->surface)
|
||||||
|
|||||||
Reference in New Issue
Block a user