mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
add some input device cleanup to x11 backend
This commit is contained in:
parent
c59210ad17
commit
b5686355f3
1 changed files with 11 additions and 0 deletions
|
@ -244,6 +244,17 @@ static void wlr_x11_backend_destroy(struct wlr_backend *backend) {
|
|||
struct wlr_x11_output *output = &x11->output;
|
||||
wlr_output_destroy(&output->wlr_output);
|
||||
|
||||
wl_signal_emit(&backend->events.input_remove, &x11->pointer_dev);
|
||||
wl_signal_emit(&backend->events.input_remove, &x11->keyboard_dev);
|
||||
// TODO probably need to use wlr_keyboard_destroy, but the devices need to
|
||||
// be malloced for that to work
|
||||
if (x11->keyboard_dev.keyboard->keymap) {
|
||||
xkb_keymap_unref(x11->keyboard_dev.keyboard->keymap);
|
||||
}
|
||||
if (x11->keyboard_dev.keyboard->xkb_state) {
|
||||
xkb_state_unref(x11->keyboard_dev.keyboard->xkb_state);
|
||||
}
|
||||
|
||||
wl_list_remove(&x11->display_destroy.link);
|
||||
|
||||
wl_event_source_remove(x11->frame_timer);
|
||||
|
|
Loading…
Reference in a new issue