Commit a7dc2df1 authored by Nick Roberts's avatar Nick Roberts
Browse files

(xt-mouse-epoch): New variable.

(xterm-mouse-event): Use float-time.
parent 915bdfc4
......@@ -105,6 +105,8 @@
(defvar xterm-mouse-y 0
"Position of last xterm mouse event relative to the frame.")
(defvar xt-mouse-epoch nil)
;; Indicator for the xterm-mouse mode.
(defun xterm-mouse-position-function (pos)
......@@ -125,7 +127,11 @@
(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)))
(timestamp (truncate
(* 1000
(- (float-time)
(or xt-mouse-epoch
(setq xt-mouse-epoch (float-time)))))))
(mouse (intern
;; For buttons > 3, the release-event looks
;; differently (see xc/programs/xterm/button.c,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment