From 48258e247b11d3562d14f4a6b82bc72c5b56589b Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Sun, 25 Aug 2019 00:41:28 +0100 Subject: wl_window: Fix incorrect timer_delete --- src/wl_window.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/wl_window.c b/src/wl_window.c index 806e243..a80eac9 100644 --- a/src/wl_window.c +++ b/src/wl_window.c @@ -178,7 +178,16 @@ static void keyboard_key(void *data, struct wl_keyboard *keyboard, if (!state) { /* If a key repeat timer is running, stop it */ - struct itimerspec off = {0}; + struct itimerspec off = { + .it_value = { + .tv_sec = 0, + .tv_nsec = 0, + }, + .it_interval = { + .tv_sec = 0, + .tv_nsec = 0, + }, + }; timer_settime(window->timer_id, 0, &off, NULL); return; } @@ -775,7 +784,7 @@ struct imv_window *imv_window_create(int width, int height, const char *title) void imv_window_free(struct imv_window *window) { - timer_delete(&window->timer_id); + timer_delete(window->timer_id); imv_keyboard_free(window->keyboard); shutdown_wayland(window); list_deep_free(window->wl_outputs); -- cgit v1.2.3