mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
fix keyboard hotplugging
This commit is contained in:
parent
9e4fc7253e
commit
0256cd1473
2 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,6 @@
|
||||||
|
|
||||||
struct sway_keyboard {
|
struct sway_keyboard {
|
||||||
struct sway_seat_device *seat_device;
|
struct sway_seat_device *seat_device;
|
||||||
struct wl_list link; // sway_seat::keyboards
|
|
||||||
|
|
||||||
struct xkb_keymap *keymap;
|
struct xkb_keymap *keymap;
|
||||||
|
|
||||||
|
|
|
@ -103,9 +103,10 @@ void sway_keyboard_configure(struct sway_keyboard *keyboard) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sway_keyboard_destroy(struct sway_keyboard *keyboard) {
|
void sway_keyboard_destroy(struct sway_keyboard *keyboard) {
|
||||||
xkb_keymap_unref(keyboard->keymap);
|
if (!keyboard) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
wl_list_remove(&keyboard->keyboard_key.link);
|
wl_list_remove(&keyboard->keyboard_key.link);
|
||||||
wl_list_remove(&keyboard->keyboard_modifiers.link);
|
wl_list_remove(&keyboard->keyboard_modifiers.link);
|
||||||
wl_list_remove(&keyboard->link);
|
|
||||||
free(keyboard);
|
free(keyboard);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue