diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2007-04-03 21:16:17 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2007-04-03 21:16:17 +0000 |
commit | ad15832ecb8ab94d3963dca3586399e2f66c9726 (patch) | |
tree | ff1037584b2a8b6f3b80a3981688818a039b1188 /lisp/xt-mouse.el | |
parent | 13cb58294e95578b672d549c16fc0b84271fc831 (diff) | |
download | emacs-ad15832ecb8ab94d3963dca3586399e2f66c9726.tar.gz |
(xterm-mouse-event): Don't use the left edge of the
window if we're outside it e.g menu-bar.
Diffstat (limited to 'lisp/xt-mouse.el')
-rw-r--r-- | lisp/xt-mouse.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index 963ed0238ed..8ae79903d51 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el @@ -49,7 +49,8 @@ ;; Mouse events symbols must have an 'event-kind property with ;; the value 'mouse-click. -(dolist (event-type '(mouse-1 mouse-2 mouse-3)) +(dolist (event-type '(mouse-1 mouse-2 mouse-3 + M-down-mouse-1 M-down-mouse-2 M-down-mouse-3)) (put event-type 'event-kind 'mouse-click)) (defun xterm-mouse-translate (event) @@ -140,6 +141,11 @@ ;; a release-event only, no down-event. (cond ((>= type 64) (format "mouse-%d" (- type 60))) + ((memq type '(8 9 10)) + (setq xterm-mouse-last type) + (format "M-down-mouse-%d" (- type 7))) + ((= type 11) + (format "mouse-%d" (- xterm-mouse-last 7))) ((= type 3) (format "mouse-%d" (+ 1 xterm-mouse-last))) (t @@ -158,7 +164,7 @@ (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)))))) + (nthcdr 2 (posn-at-x-y x y)))))) (setcar (nthcdr 3 event) timestamp) event))))) |