aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-06-05 04:15:43 -0400
committerJesse Luehrs <doy@tozt.net>2016-06-05 04:15:43 -0400
commit799bb387606df24b6a267d7956b74a1c29611618 (patch)
tree9e2de6f2e9c22bb973f4ad7b2d5b93ecf5f8ebab
parentaac5a4ab3b5189909b7a3a7d3357072cac7f54da (diff)
downloadrunes-799bb387606df24b6a267d7956b74a1c29611618.tar.gz
runes-799bb387606df24b6a267d7956b74a1c29611618.zip
reset the timer here before doing things that take time
-rw-r--r--src/window-xlib.c16
1 files 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)