From 799bb387606df24b6a267d7956b74a1c29611618 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 5 Jun 2016 04:15:43 -0400 Subject: reset the timer here before doing things that take time --- src/window-xlib.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/window-xlib.c b/src/window-xlib.c index 6430a86..57e81aa 100644 --- a/src/window-xlib.c +++ b/src/window-xlib.c @@ -1124,6 +1124,14 @@ static void runes_window_handle_multi_click(RunesTerm *t, XButtonEvent *e) return; } + if (w->multi_click_timer_event) { + runes_loop_timer_clear(t->loop, w->multi_click_timer_event); + } + + w->multi_click_timer_event = runes_loop_timer_set( + t->loop, t->config->double_click_rate, t, + runes_window_multi_click_cb); + w->multi_clicks++; if (w->multi_clicks > 1) { struct vt100_loc loc; @@ -1145,14 +1153,6 @@ static void runes_window_handle_multi_click(RunesTerm *t, XButtonEvent *e) runes_window_update_selection_loc(t, &loc); } } - - if (w->multi_click_timer_event) { - runes_loop_timer_clear(t->loop, w->multi_click_timer_event); - } - - w->multi_click_timer_event = runes_loop_timer_set( - t->loop, t->config->double_click_rate, t, - runes_window_multi_click_cb); } static void runes_window_beginning_of_word(RunesTerm *t, struct vt100_loc *loc) -- cgit v1.2.3-54-g00ecf