[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse)
From: |
Nick Roberts |
Subject: |
Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse) |
Date: |
Wed, 21 Mar 2007 12:49:12 +1200 |
> > Thanks, and please install your patch.
> >
> > Is this issue settled?
>
> Mouse clicks on an xterm don't seem to carry timestamp information (or, at
> least xt-mouse.el doesn't extract it) so I suggest adding the patch below to
> the manual. xterm-mouse-mode is currently turned off by default, so I
> think it's reasonable to keep mouse-1-click-follows-link in this case.
Actually the patch below seems to work for xt-mouse.el. The timestamp isn't
computed directly from the mouse click, but for a value of many (450)
milliseconds it seems good enough.
Shall I install it?
--
Nick http://www.inet.net.nz/~nickrob
*** xt-mouse.el 21 Jan 2007 23:13:01 +1300 1.34
--- xt-mouse.el 21 Mar 2007 12:40:38 +1200
***************
*** 124,129 ****
--- 124,131 ----
(let* ((type (- (xterm-mouse-event-read) #o40))
(x (- (xterm-mouse-event-read) #o40 1))
(y (- (xterm-mouse-event-read) #o40 1))
+ (time (current-time))
+ (timestamp (+ ( * (nth 1 time) 1000 ) (/ (nth 2 time) 1000)))
(mouse (intern
;; For buttons > 3, the release-event looks
;; differently (see xc/programs/xterm/button.c,
***************
*** 145,154 ****
xterm-mouse-y y)
(setq
last-input-event
! (if w
! (list mouse (posn-at-x-y (- x left) (- y top) w t))
! (list mouse
! (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t))))))))
;;;###autoload
(define-minor-mode xterm-mouse-mode
--- 147,159 ----
xterm-mouse-y y)
(setq
last-input-event
! (list mouse
! (let ((event (if w
! (posn-at-x-y (- x left) (- y top) w t)
! (append (list nil 'menu-bar)
! (nthcdr 2 (posn-at-x-y x y w t))))))
! (setcar (nthcdr 3 event) timestamp)
! event)))))
;;;###autoload
(define-minor-mode xterm-mouse-mode
- Re: mouse-1-click-follows-link with t-mouse, (continued)
- Re: mouse-1-click-follows-link with t-mouse, Richard Stallman, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Nick Roberts, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Kim F. Storm, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Nick Roberts, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Kim F. Storm, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Chong Yidong, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Richard Stallman, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Nick Roberts, 2007/03/19
- Re: mouse-1-click-follows-link with t-mouse, Richard Stallman, 2007/03/20
- Re: mouse-1-click-follows-link with t-mouse, Kim F. Storm, 2007/03/21
- Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse),
Nick Roberts <=
- Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse), Kim F. Storm, 2007/03/21
- Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse), Nick Roberts, 2007/03/21
- Re: mouse-1-click-follows-link with xt-mouse (was: with t-mouse), Richard Stallman, 2007/03/21
- Re: mouse-1-click-follows-link with t-mouse, Chong Yidong, 2007/03/19
- Re: Updating the homepage, Romain Francoise, 2007/03/25
- RE: Updating the homepage, Drew Adams, 2007/03/25
- Re: Updating the homepage, David Kastrup, 2007/03/25
- Re: Updating the homepage, Eli Zaretskii, 2007/03/25
- Re: Updating the homepage, David Kastrup, 2007/03/25
- Re: Updating the homepage, YAMAMOTO Mitsuharu, 2007/03/25