diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2016-11-20 23:15:28 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2016-11-20 23:15:28 +0100 |
commit | 4aea3239b95d1c3866e790eac4e93125c1d52462 (patch) | |
tree | 94e9c9ea7abfc91748ca152c8f31a925c8471db0 /nncmpp.c | |
parent | 1fa2ddbdfdc674f62f2940dff5814f169d6353a1 (diff) | |
download | nncmpp-4aea3239b95d1c3866e790eac4e93125c1d52462.tar.gz nncmpp-4aea3239b95d1c3866e790eac4e93125c1d52462.tar.xz nncmpp-4aea3239b95d1c3866e790eac4e93125c1d52462.zip |
Improve double click detection
Diffstat (limited to 'nncmpp.c')
-rw-r--r-- | nncmpp.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -3114,7 +3114,11 @@ app_on_tty_readable (const struct pollfd *fd, void *user_data) && y_last == y && x_last == x && last_button == button; if (!app_process_mouse (type, y, x, button, double_click)) beep (); - if (type == TERMO_MOUSE_PRESS) + + // Prevent interpreting triple clicks as two double clicks + if (double_click) + last_button = 0; + else if (type == TERMO_MOUSE_PRESS) last_button = button; } else if (!app_process_termo_event (&event)) |