diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-08-14 05:36:34 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-08-14 05:36:34 +0000 |
| commit | 9b65531d6a7f540b67ad87face1c911bb912a66c (patch) | |
| tree | 55d0c2580e05831e441622647e105ae40585552c /wayland.c | |
| parent | input: don't crash on mouse motion events on the render timer surface (diff) | |
| parent | doc: footrc: document modifiers in mouse bindings (diff) | |
Merge branch 'modifiers-in-mouse-bindings' into master
Diffstat (limited to 'wayland.c')
| -rw-r--r-- | wayland.c | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -125,6 +125,8 @@ seat_destroy(struct seat *seat) tll_free(it->item.bind.key_codes); tll_free(seat->kbd.bindings.search); + tll_free(seat->mouse.bindings); + if (seat->kbd.xkb_compose_state != NULL) xkb_compose_state_unref(seat->kbd.xkb_compose_state); if (seat->kbd.xkb_compose_table != NULL) @@ -762,9 +764,6 @@ handle_global(void *data, struct wl_registry *registry, struct wl_seat *wl_seat = wl_registry_bind( wayl->registry, name, &wl_seat_interface, required); - /* Clipboard */ - /* Primary selection */ - tll_push_back(wayl->seats, ((struct seat){ .wayl = wayl, .wl_seat = wl_seat, @@ -913,22 +912,27 @@ handle_global_remove(void *data, struct wl_registry *registry, uint32_t name) if (seat->kbd_focus != NULL) { LOG_WARN("compositor destroyed seat '%s' " - "without sending keyboard/pointer leave events", + "without sending a keyboard leave event", seat->name); - struct terminal *term = seat->kbd_focus; - if (seat->wl_keyboard != NULL) keyboard_listener.leave( - seat, seat->wl_keyboard, -1, term->window->surface); + seat, seat->wl_keyboard, -1, seat->kbd_focus->window->surface); + } + + if (seat->mouse_focus != NULL) { + LOG_WARN("compositor destroyed seat '%s' " + "without sending a pointer leave event", + seat->name); if (seat->wl_pointer != NULL) pointer_listener.leave( - seat, seat->wl_pointer, -1, term->window->surface); + seat, seat->wl_pointer, -1, seat->mouse_focus->window->surface); } seat_destroy(seat); tll_remove(wayl->seats, it); + return; } LOG_WARN("unknown global removed: 0x%08x", name); |
