Subject: Re: bug#28658: 27.0.50; [PATCH] double/triple clicking in xterm-mouse-mode doesn't respect mouse position

From: Alex <[email-masked]>
Date: Sun, 01 Oct 2017 12:30:23 -0600

martin rudalics <[email-masked]> writes:

> +           ((and last-time
> +                 (> double-click-time (* 1000 (- this-time last-time)))
>
> Note that here and elsewhere coders assume that ‘double-click-time’ is a
> number.  However, it may be also nil or t and we should fix those
> instances eventually (see Bug#23419).  In new or changed code, at least.

Sure, here's a third patch to deal with that:

>From efb7f09f585d6652221f5e58e9bc635e6100a588 Mon Sep 17 00:00:00 2001
From: Alexander Gramiak <[email-masked]>
Date: Sun, 1 Oct 2017 12:21:19 -0600
Subject: [PATCH] * lisp/xt-mouse.el (xterm-mouse-event): Handle boolean
 double-click-time

---
 lisp/xt-mouse.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index cbbeec82fa..aa5aa0f7f5 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -291,7 +291,9 @@ xterm-mouse-event
                        (equal name (replace-match "" t t last-name)))
               (xterm-mouse--set-click-count event click-count)))
            ((and last-time
-                 (> double-click-time (* 1000 (- this-time last-time)))
+                 double-click-time
+                 (or (eq double-click-time t)
+                     (> double-click-time (* 1000 (- this-time last-time))))
                  (eq x last-x)
                  (eq y last-y)
                  (equal last-name (replace-match "" t t name)))
-- 
2.14.2