diff options
| author | Kim F. Storm | 2004-08-02 15:19:24 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-08-02 15:19:24 +0000 |
| commit | 5970bd01f02aee80ba8353f6f7c6e6e5512eaeb4 (patch) | |
| tree | a55ddf0c3e8ba69f025a6a61320b2ac7acf59562 | |
| parent | ec2b66c4c23c702023938f994e87fd3b01c306be (diff) | |
| download | emacs-5970bd01f02aee80ba8353f6f7c6e6e5512eaeb4.tar.gz emacs-5970bd01f02aee80ba8353f6f7c6e6e5512eaeb4.zip | |
(mouse-avoidance-point-position): Use window-inside-edges
and call compute-motion with nil for topos and width to get proper
usable width and height for both window and non-window systems.
| -rw-r--r-- | lisp/avoid.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/avoid.el b/lisp/avoid.el index 5a5a09622cd..536b80abdbe 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -139,15 +139,15 @@ Only applies in mouse-avoidance-modes `animate' and `jump'." | |||
| 139 | "Return the position of point as (FRAME X . Y). | 139 | "Return the position of point as (FRAME X . Y). |
| 140 | Analogous to mouse-position." | 140 | Analogous to mouse-position." |
| 141 | (let* ((w (selected-window)) | 141 | (let* ((w (selected-window)) |
| 142 | (edges (window-edges w)) | 142 | (edges (window-inside-edges w)) |
| 143 | (list | 143 | (list |
| 144 | (compute-motion (max (window-start w) (point-min)) ; start pos | 144 | (compute-motion (max (window-start w) (point-min)) ; start pos |
| 145 | ;; window-start can be < point-min if the | 145 | ;; window-start can be < point-min if the |
| 146 | ;; latter has changed since the last redisplay | 146 | ;; latter has changed since the last redisplay |
| 147 | '(0 . 0) ; start XY | 147 | '(0 . 0) ; start XY |
| 148 | (point) ; stop pos | 148 | (point) ; stop pos |
| 149 | (cons (window-width) (window-height)); stop XY: none | 149 | nil ; stop XY: none |
| 150 | (1- (window-width)) ; width | 150 | nil ; width |
| 151 | (cons (window-hscroll w) 0) ; 0 may not be right? | 151 | (cons (window-hscroll w) 0) ; 0 may not be right? |
| 152 | (selected-window)))) | 152 | (selected-window)))) |
| 153 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) | 153 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) |