John Paul Wallington <jpw(a)shootybangbang.com> wrote:
John Paul Wallington <jpw(a)shootybangbang.com> wrote:
[...]
> FWIW, the problem is with `mouse-position'. It should
return a list
> (WINDOW X . Y) giving the current mouse window and position, and
> return (nil nil) when the cursor is not over a character, or not over
> a window. But it appears to return (nil nil) nearly all the time.
Lies ?
Try this too:
--- avoid.el~ Sun Jun 30 01:02:27 2002
+++ avoid.el Tue Jul 2 06:54:25 2002
@@ -328,7 +328,7 @@
(mouse-avoidance-too-close-p (mouse-position)))
(let ((old-pos (mouse-position)))
(mouse-avoidance-nudge-mouse)
- (if (not (eq (selected-frame) (car old-pos)))
+ (if (not (eq (selected-window) (car old-pos)))
;; This should never happen.
(apply 'set-mouse-position old-pos)))))
also, consider this:
repeatedly eval the following `setq' until you get a (WINDOW X . Y)
return value ...
(setq foo (mouse-position))
then use `apply' like `mouse-avoidance-fancy-hook' does ...
(apply 'set-mouse-position foo)
=> Malformed list: (#<window on "*scratch*" 0xaa7> 14 . 8)
unlike the apply, this works with (WINDOW X . Y) values...
(set-mouse-position (car foo) (cadr foo) (cddr foo))
--
John Paul Wallington