wayland: Don't try to disconnect the listener from the signal handler
This is not needed since the instance is being destroyed and in fact actively harmful when code called from other handlers disconnects us for other reasons. In that case we might crash because the disconnection doesn't prevent other handlers from running in the current signal emission and thus we try to remove ourselves from an empty list.
This commit is contained in:
parent
d41fba6558
commit
0313b38dd6
3 changed files with 0 additions and 5 deletions
|
@ -222,7 +222,6 @@ keyboard_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
|
|||
{
|
||||
MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_surface_listener);
|
||||
|
||||
wl_list_remove (&keyboard->focus_surface_listener.link);
|
||||
keyboard->focus_surface = NULL;
|
||||
|
||||
if (keyboard->focus_resource)
|
||||
|
@ -237,7 +236,6 @@ keyboard_handle_focus_resource_destroy (struct wl_listener *listener, void *data
|
|||
{
|
||||
MetaWaylandKeyboard *keyboard = wl_container_of (listener, keyboard, focus_resource_listener);
|
||||
|
||||
wl_list_remove (&keyboard->focus_resource_listener.link);
|
||||
keyboard->focus_resource = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,6 @@ pointer_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
|
|||
{
|
||||
MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_surface_listener);
|
||||
|
||||
wl_list_remove (&pointer->focus_surface_listener.link);
|
||||
pointer->focus_surface = NULL;
|
||||
|
||||
if (pointer->focus_resource)
|
||||
|
@ -74,7 +73,6 @@ pointer_handle_focus_resource_destroy (struct wl_listener *listener, void *data)
|
|||
{
|
||||
MetaWaylandPointer *pointer = wl_container_of (listener, pointer, focus_resource_listener);
|
||||
|
||||
wl_list_remove (&pointer->focus_resource_listener.link);
|
||||
pointer->focus_resource = NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ surface_handle_buffer_destroy (struct wl_listener *listener, void *data)
|
|||
wl_resource_post_error (surface->resource, WL_DISPLAY_ERROR_INVALID_OBJECT,
|
||||
"Destroyed buffer while it was attached to the surface");
|
||||
surface->buffer = NULL;
|
||||
wl_list_remove (&surface->buffer_destroy_listener.link);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue