aboutsummaryrefslogtreecommitdiff
path: root/examples/shared.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-08-12 08:21:18 -0400
committerGitHub <noreply@github.com>2017-08-12 08:21:18 -0400
commit53a53f55b4f2212fbe81e77beca85f45400e12de (patch)
tree3d54d0664fe73de8145ee57af890a818ec5b7e5b /examples/shared.c
parent65a899924221c3104800a8676852b34b0cd7223d (diff)
parent3ea878b76e7cf63caf9cddaaabe2faca053d9085 (diff)
Merge pull request #74 from martinetd/more_leaks
More leaks
Diffstat (limited to 'examples/shared.c')
-rw-r--r--examples/shared.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/shared.c b/examples/shared.c
index 6efa1bef..0738a548 100644
--- a/examples/shared.c
+++ b/examples/shared.c
@@ -311,6 +311,8 @@ static void keyboard_remove(struct wlr_input_device *device, struct compositor_s
if (!kbstate) {
return;
}
+ xkb_state_unref(kbstate->xkb_state);
+ xkb_map_unref(kbstate->keymap);
wl_list_remove(&kbstate->link);
wl_list_remove(&kbstate->key.link);
free(kbstate);
@@ -384,14 +386,13 @@ static void tablet_pad_remove(struct wlr_input_device *device, struct compositor
if (!pstate) {
return;
}
- // TODO probably missing more actions
+ wl_list_remove(&pstate->button.link);
free(pstate);
}
-// TODO missing something that calls this on teardown
static void input_remove_notify(struct wl_listener *listener, void *data) {
struct wlr_input_device *device = data;
- struct compositor_state *state = wl_container_of(listener, state, input_add);
+ struct compositor_state *state = wl_container_of(listener, state, input_remove);
switch (device->type) {
case WLR_INPUT_DEVICE_KEYBOARD:
keyboard_remove(device, state);