aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlatorre <tlatorre@uchicago.edu>2022-11-12 16:54:15 -0800
committertlatorre <tlatorre@uchicago.edu>2022-11-12 16:54:15 -0800
commit23ef9f2c2213d45b121eee9bd4fd1e71b171118d (patch)
treea31c990950110f1bc07e9d6024e30e457f32013d
parent389ed1929cd0de17e533b98b0d3b51c8535110e9 (diff)
downloadmoji-master.tar.gz
moji-master.tar.bz2
moji-master.zip
update code to still clear the screen if you've held the mouse button for 10 secondsHEADmaster
-rw-r--r--moji.c3
1 files changed, 2 insertions, 1 deletions
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];