From: Eli Zaretskii <eliz@gnu.org>
To: Alex <agrambot@gmail.com>
Cc: 28658@debbugs.gnu.org
Subject: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position
Date: Thu, 05 Oct 2017 13:36:00 +0300 [thread overview]
Message-ID: <83zi95x4of.fsf@gnu.org> (raw)
In-Reply-To: <87r2unyh79.fsf@gmail.com> (message from Alex on Sat, 30 Sep 2017 16:06:34 -0600)
> From: Alex <agrambot@gmail.com>
> Date: Sat, 30 Sep 2017 16:06:34 -0600
>
> 1. emacs -Q -nw
> 2. M-x xterm-mouse-mode RET
> 3. Click once, then quickly move the cursor to a different word and click again.
> 4. Notice that the 2nd click was registered as a double click even
> though the cursor moved.
> 5. Click once, and quickly perform step 3 again. Notice that the 3rd
> click was registered as a triple click even though the cursor moved.
>
> I've attached a patch that fixes this behaviour.
Thanks, I have a comment to this, but in general this is the right
fix, IMO.
> It would be nice if it worked with pixel positions rather than
> character positions, but I'm not sure how to do that in a terminal
> Emacs.
You can't: TTY frames cannot discern screen positions with resolution
of more than 1 character.
> @@ -290,12 +292,14 @@ xterm-mouse-event
> (xterm-mouse--set-click-count event click-count)))
> ((not last-time) nil)
> ((and (> double-click-time (* 1000 (- this-time last-time)))
> + (eq x last-x)
> + (eq y last-y)
IMO, 'eq' is not right here: this test should obey the value of
double-click-fuzz, whose units on TTY frames are 1/8 of a character.
next prev parent reply other threads:[~2017-10-05 10:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-30 22:06 bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position Alex
2017-10-01 3:56 ` Alex
2017-10-01 8:23 ` martin rudalics
2017-10-01 18:30 ` Alex
2017-10-05 10:52 ` Eli Zaretskii
2017-10-05 10:52 ` Eli Zaretskii
2017-10-06 0:03 ` Alex
2017-10-06 7:44 ` Eli Zaretskii
2017-10-09 2:37 ` Alex
2017-10-09 7:11 ` Eli Zaretskii
2017-10-05 10:36 ` Eli Zaretskii [this message]
2017-10-06 0:14 ` Alex
2017-10-06 7:14 ` Eli Zaretskii
2017-10-07 21:57 ` Alex
2017-10-08 7:42 ` Eli Zaretskii
2017-10-08 23:44 ` Alex
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zi95x4of.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=28658@debbugs.gnu.org \
--cc=agrambot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).