diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-10-27 15:21:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-10-27 15:21:19 +0000 |
| commit | 061bbd704961b17419fd69344af6268487abb926 (patch) | |
| tree | dbcd298ccffd325fb97e3deaee5d151df55f4bf8 /kbd.c | |
| parent | wayland: move clipboard/primary structs into the wayland struct (diff) | |
kbd: break out XKB kbd struct to a separate file
Diffstat (limited to 'kbd.c')
| -rw-r--r-- | kbd.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#include "kbd.h" + +#include <xkbcommon/xkbcommon-compose.h> + +void +kbd_destroy(struct kbd *kbd) +{ + if (kbd->xkb_compose_state != NULL) + xkb_compose_state_unref(kbd->xkb_compose_state); + if (kbd->xkb_compose_table != NULL) + xkb_compose_table_unref(kbd->xkb_compose_table); + if (kbd->xkb_keymap != NULL) + xkb_keymap_unref(kbd->xkb_keymap); + if (kbd->xkb_state != NULL) + xkb_state_unref(kbd->xkb_state); + if (kbd->xkb != NULL) + xkb_context_unref(kbd->xkb); +} |
