From 23ef9f2c2213d45b121eee9bd4fd1e71b171118d Mon Sep 17 00:00:00 2001 From: tlatorre Date: Sat, 12 Nov 2022 16:54:15 -0800 Subject: update code to still clear the screen if you've held the mouse button for 10 seconds --- moji.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moji.c b/moji.c index d2724fc..920b729 100644 --- a/moji.c +++ b/moji.c @@ -241,9 +241,10 @@ gboolean timer(gpointer data) * the screen. */ current_position = 0; current_letter = 0; + write_buf(); processed = TRUE; aeGetTime(&pressed_time_sec,&pressed_time_msec); - } else if (diff > CLICK_TIME) { + } else if ((processed == FALSE) && (diff > CLICK_TIME)) { /* If the mouse button has been clicked for more than CLICK_TIME * milliseconds, add the current character to the buffer. */ current_char = current_chars->characters[current_letter % current_chars->len]; -- cgit