aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Roberts2007-03-21 20:33:26 +0000
committerNick Roberts2007-03-21 20:33:26 +0000
commit915bdfc401c04cf19b8ca0d28c08ad8fa820bd56 (patch)
treecbb9ba01325cddc69161ed218245db70a6d20ab8
parent086b2469dcb60283dec5cd5b44dd788c4c454207 (diff)
downloademacs-915bdfc401c04cf19b8ca0d28c08ad8fa820bd56.tar.gz
emacs-915bdfc401c04cf19b8ca0d28c08ad8fa820bd56.zip
(xterm-mouse-event): Compute a timestamp using
current-time.
-rw-r--r--lisp/xt-mouse.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el
index de59563a6c4..39333f74868 100644
--- a/lisp/xt-mouse.el
+++ b/lisp/xt-mouse.el
@@ -124,6 +124,8 @@
124 (let* ((type (- (xterm-mouse-event-read) #o40)) 124 (let* ((type (- (xterm-mouse-event-read) #o40))
125 (x (- (xterm-mouse-event-read) #o40 1)) 125 (x (- (xterm-mouse-event-read) #o40 1))
126 (y (- (xterm-mouse-event-read) #o40 1)) 126 (y (- (xterm-mouse-event-read) #o40 1))
127 (time (current-time))
128 (timestamp (+ ( * (nth 1 time) 1000 ) (/ (nth 2 time) 1000)))
127 (mouse (intern 129 (mouse (intern
128 ;; For buttons > 3, the release-event looks 130 ;; For buttons > 3, the release-event looks
129 ;; differently (see xc/programs/xterm/button.c, 131 ;; differently (see xc/programs/xterm/button.c,
@@ -145,10 +147,13 @@
145 xterm-mouse-y y) 147 xterm-mouse-y y)
146 (setq 148 (setq
147 last-input-event 149 last-input-event
148 (if w 150 (list mouse
149 (list mouse (posn-at-x-y (- x left) (- y top) w t)) 151 (let ((event (if w
150 (list mouse 152 (posn-at-x-y (- x left) (- y top) w t)
151 (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w t)))))))) 153 (append (list nil 'menu-bar)
154 (nthcdr 2 (posn-at-x-y x y w t))))))
155 (setcar (nthcdr 3 event) timestamp)
156 event)))))
152 157
153;;;###autoload 158;;;###autoload
154(define-minor-mode xterm-mouse-mode 159(define-minor-mode xterm-mouse-mode