changeset 76590:0073c48648d0

(t-mouse-make-event-element): Use timestamp output from client program, mev, to compute mouse event.
author Nick Roberts <nickrob@snap.net.nz>
date Mon, 19 Mar 2007 20:07:45 +0000
parents f5dd43c10eda
children bd2559b637c6
files lisp/t-mouse.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/t-mouse.el	Mon Mar 19 20:07:23 2007 +0000
+++ b/lisp/t-mouse.el	Mon Mar 19 20:07:45 2007 +0000
@@ -134,14 +134,19 @@
 
 (defun t-mouse-make-event-element (x-dot-y-avec-time)
   (let* ((x-dot-y (nth 0 x-dot-y-avec-time))
+	 (time (nth 1 x-dot-y-avec-time))
          (x (car x-dot-y))
          (y (cdr x-dot-y))
          (w (window-at x y))
          (ltrb (window-edges w))
          (left (nth 0 ltrb))
-         (top (nth 1 ltrb)))
-    (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))))))
+         (top (nth 1 ltrb))
+	 (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) time)
+    event))
 
 ;;; This fun is partly Copyright (C) 1994 Per Abrahamsen <abraham@iesd.auc.dk>
 (defun t-mouse-make-event ()