bug: fix seat handle destroy handler
This commit is contained in:
parent
c0e8585a4c
commit
f9d578700e
|
@ -353,6 +353,7 @@ static void drag_handle_seat_unbound(struct wl_listener *listener, void *data) {
|
||||||
|
|
||||||
if (drag->focus_handle == unbound_handle) {
|
if (drag->focus_handle == unbound_handle) {
|
||||||
drag->focus_handle = NULL;
|
drag->focus_handle = NULL;
|
||||||
|
wl_list_remove(&drag->handle_unbound.link);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,6 +142,8 @@ static void wl_seat_get_touch(struct wl_client *client,
|
||||||
|
|
||||||
static void wlr_seat_handle_resource_destroy(struct wl_resource *resource) {
|
static void wlr_seat_handle_resource_destroy(struct wl_resource *resource) {
|
||||||
struct wlr_seat_handle *handle = wl_resource_get_user_data(resource);
|
struct wlr_seat_handle *handle = wl_resource_get_user_data(resource);
|
||||||
|
wl_signal_emit(&handle->wlr_seat->events.client_unbound, handle);
|
||||||
|
|
||||||
if (handle == handle->wlr_seat->pointer_state.focused_handle) {
|
if (handle == handle->wlr_seat->pointer_state.focused_handle) {
|
||||||
handle->wlr_seat->pointer_state.focused_handle = NULL;
|
handle->wlr_seat->pointer_state.focused_handle = NULL;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +163,6 @@ static void wlr_seat_handle_resource_destroy(struct wl_resource *resource) {
|
||||||
if (handle->data_device) {
|
if (handle->data_device) {
|
||||||
wl_resource_destroy(handle->data_device);
|
wl_resource_destroy(handle->data_device);
|
||||||
}
|
}
|
||||||
wl_signal_emit(&handle->wlr_seat->events.client_unbound, handle);
|
|
||||||
wl_list_remove(&handle->link);
|
wl_list_remove(&handle->link);
|
||||||
free(handle);
|
free(handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue