summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1998-02-06 21:56:29 +0000
committerRichard M. Stallman <rms@gnu.org>1998-02-06 21:56:29 +0000
commit95cc70ec9372d90df03bda8f25c800836327cdc1 (patch)
tree32f5db74d7684a33f5b37433e98b81c77d69332f
parent4fb7171c1a5b6ea96f1c933b615a688016352027 (diff)
downloademacs-95cc70ec9372d90df03bda8f25c800836327cdc1.tar.gz
(mouse-avoidance-fancy-hook): Do nothing if button is down.
(mouse-avoidance-exile-hook, mouse-avoidance-banish-hook): Likewise.
-rw-r--r--lisp/avoid.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/lisp/avoid.el b/lisp/avoid.el
index 1c7ece39272..1d80ed9f8c1 100644
--- a/lisp/avoid.el
+++ b/lisp/avoid.el
@@ -267,6 +267,10 @@ redefine this function to suit your own tastes."
(defun mouse-avoidance-banish-hook ()
(if (and (not executing-kbd-macro) ; don't check inside macro
+ ;; Don't check while mouse is down.
+ (not (and (consp last-input-event)
+ (symbolp (car last-input-event))
+ (memq 'down (event-modifiers (car last-input-event)))))
(mouse-avoidance-kbd-command (this-command-keys)))
(mouse-avoidance-banish-mouse)))
@@ -274,6 +278,9 @@ redefine this function to suit your own tastes."
;; For exile mode, the state is nil when the mouse is in its normal
;; position, and set to the old mouse-position when the mouse is in exile.
(if (and (not executing-kbd-macro)
+ (not (and (consp last-input-event)
+ (symbolp (car last-input-event))
+ (memq 'down (event-modifiers (car last-input-event)))))
(mouse-avoidance-kbd-command (this-command-keys)))
(let ((mp (mouse-position)))
(cond ((and (not mouse-avoidance-state)
@@ -293,6 +300,9 @@ redefine this function to suit your own tastes."
(defun mouse-avoidance-fancy-hook ()
;; Used for the "fancy" modes, ie jump et al.
(if (and (not executing-kbd-macro) ; don't check inside macro
+ (not (and (consp last-input-event)
+ (symbolp (car last-input-event))
+ (memq 'down (event-modifiers (car last-input-event)))))
(mouse-avoidance-kbd-command (this-command-keys))
(mouse-avoidance-too-close-p (mouse-position)))
(let ((old-pos (mouse-position)))