diff options
| author | Nick Roberts | 2005-01-14 07:36:50 +0000 |
|---|---|---|
| committer | Nick Roberts | 2005-01-14 07:36:50 +0000 |
| commit | fcd9df1bf09a63ee2c7b39966f360e37d557fb71 (patch) | |
| tree | a3a32e30228544b6929236f201239b9e1711b1b2 | |
| parent | 5ca75c83ef58d012acef2a4bea01281cc5c0fa89 (diff) | |
| download | emacs-fcd9df1bf09a63ee2c7b39966f360e37d557fb71.tar.gz emacs-fcd9df1bf09a63ee2c7b39966f360e37d557fb71.zip | |
(xterm-mouse-event): Compute window co-ordinates
more carefully.
| -rw-r--r-- | lisp/xt-mouse.el | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/xt-mouse.el b/lisp/xt-mouse.el index de93456ad5a..5709834ab91 100644 --- a/lisp/xt-mouse.el +++ b/lisp/xt-mouse.el | |||
| @@ -138,15 +138,17 @@ | |||
| 138 | (t | 138 | (t |
| 139 | (setq xterm-mouse-last type) | 139 | (setq xterm-mouse-last type) |
| 140 | (format "down-mouse-%d" (+ 1 type)))))) | 140 | (format "down-mouse-%d" (+ 1 type)))))) |
| 141 | (w (window-at x y))) | 141 | (w (window-at x y)) |
| 142 | (ltrb (window-edges w)) | ||
| 143 | (left (nth 0 ltrb)) | ||
| 144 | (top (nth 1 ltrb))) | ||
| 145 | |||
| 142 | (setq xterm-mouse-x x | 146 | (setq xterm-mouse-x x |
| 143 | xterm-mouse-y y) | 147 | xterm-mouse-y y) |
| 144 | (if w | 148 | (if w |
| 145 | (list mouse (posn-at-x-y x (if menu-bar-mode (- y 1) y) w)) | 149 | (list mouse (posn-at-x-y (- x left) (- y top) w)) |
| 146 | (list mouse | 150 | (list mouse |
| 147 | (append (list nil 'menu-bar) | 151 | (append (list nil 'menu-bar) (nthcdr 2 (posn-at-x-y x y w))))))) |
| 148 | (nthcdr 2 (posn-at-x-y | ||
| 149 | x (if menu-bar-mode (- y 1) y) w))))))) | ||
| 150 | 152 | ||
| 151 | ;;;###autoload | 153 | ;;;###autoload |
| 152 | (define-minor-mode xterm-mouse-mode | 154 | (define-minor-mode xterm-mouse-mode |