]> git.eshelyaron.com Git - emacs.git/commitdiff
term/mac-win.el (mac-scroll-ignore-events, mac-scroll-down)
authorSteven Tamm <steventamm@mac.com>
Thu, 8 Jul 2004 15:24:54 +0000 (15:24 +0000)
committerSteven Tamm <steventamm@mac.com>
Thu, 8 Jul 2004 15:24:54 +0000 (15:24 +0000)
(mac-scroll-down-line, mac-scroll-up, mac-scroll-up-line):
Do not treat double clicks and triple clicks specially in the
scroll bar (preventing strange repositioning problems)

lisp/ChangeLog
lisp/term/mac-win.el

index 32abe4c4ae783e8b29c692cb4ce2ebe2e943d046..b36e1bae10c1b879ad9f92efcba4c01cab6eba5f 100644 (file)
@@ -1,3 +1,10 @@
+2004-07-08  Steven Tamm  <steventamm@mac.com>
+
+       * term/mac-win.el (mac-scroll-ignore-events, mac-scroll-down)
+       (mac-scroll-down-line, mac-scroll-up, mac-scroll-up-line):
+       Do not treat double clicks and triple clicks specially in the
+       scroll bar (preventing strange repositioning problems)
+
 2004-07-06  Stefan  <monnier@iro.umontreal.ca>
 
        * replace.el (query-replace-regexp-eval): Fix last change.
index 9a61a8057b4ff3af0d0fea633f71d4a22e6a23de..e42c2151701d00ddbfe8dd09c718929258090f0e 100644 (file)
       (goto-char (window-start window))
       (mac-scroll-up-line)))))
 
+(defun mac-scroll-ignore-events ()
+  ;; Ignore confusing non-mouse events
+  (while (not (memq (car-safe (read-event))
+                   '(mouse-1 double-mouse-1 triple-mouse-1))) nil))
+
 (defun mac-scroll-down ()
   (track-mouse
-    (while (not (eq (car-safe (read-event)) 'mouse-1)) nil)
+    (mac-scroll-ignore-events)
     (scroll-down)))
 
 (defun mac-scroll-down-line ()
   (track-mouse
-    (while (not (eq (car-safe (read-event)) 'mouse-1)) nil)
+    (mac-scroll-ignore-events)
     (scroll-down 1)))
 
 (defun mac-scroll-up ()
   (track-mouse
-    (while (not (eq (car-safe (read-event)) 'mouse-1)) nil)
+    (mac-scroll-ignore-events)
     (scroll-up)))
 
 (defun mac-scroll-up-line ()
   (track-mouse
-    (while (not (eq (car-safe (read-event)) 'mouse-1)) nil)
+    (mac-scroll-ignore-events)
     (scroll-up 1)))
 
 (defun xw-defined-colors (&optional frame)