[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 89b0023: Increase xterm click count only within d
From: |
Alexander Gramiak |
Subject: |
[Emacs-diffs] emacs-26 89b0023: Increase xterm click count only within double-click-fuzz |
Date: |
Sun, 8 Oct 2017 19:30:28 -0400 (EDT) |
branch: emacs-26
commit 89b0023044d24d67a595213f82e28d213db45413
Author: Alexander Gramiak <address@hidden>
Commit: Alexander Gramiak <address@hidden>
Increase xterm click count only within double-click-fuzz
* lisp/xt-mouse.el (xterm-mouse-event): Save the last click's position
and check it against the current click's position. (Bug#28658)
---
lisp/xt-mouse.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index d268e1a..d704cfa 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -278,6 +278,8 @@ which is the \"1006\" extension implemented in Xterm >=
277."
(last-name (symbol-name last-type))
(last-time (nth 1 last-click))
(click-count (nth 2 last-click))
+ (last-x (nth 3 last-click))
+ (last-y (nth 4 last-click))
(this-time (float-time))
(name (symbol-name type)))
(cond
@@ -292,12 +294,16 @@ which is the \"1006\" extension implemented in Xterm >=
277."
double-click-time
(or (eq double-click-time t)
(> double-click-time (* 1000 (- this-time last-time))))
+ (<= (abs (- x last-x))
+ (/ double-click-fuzz 8))
+ (<= (abs (- y last-y))
+ (/ double-click-fuzz 8))
(equal last-name (replace-match "" t t name)))
(setq click-count (1+ click-count))
(xterm-mouse--set-click-count event click-count))
(t (setq click-count 1)))
(set-terminal-parameter nil 'xterm-mouse-last-click
- (list type this-time click-count)))
+ (list type this-time click-count x y)))
(set-terminal-parameter nil 'xterm-mouse-x x)
(set-terminal-parameter nil 'xterm-mouse-y y)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 89b0023: Increase xterm click count only within double-click-fuzz,
Alexander Gramiak <=