emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xt-mouse wheel support patch


From: Jaeyoun Chung
Subject: xt-mouse wheel support patch
Date: 29 Nov 2001 12:30:32 +0900
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Here is xt-mouse patch for wheel mouse support.
(it does not handle properly for the mouse-{4,5} event correctly.)

----------------------------------------------------------------------
diff -u lisp/xt-mouse.el.\~1\~ lisp/xt-mouse.el
--- lisp/xt-mouse.el.~1~        Thu Jul 26 02:41:21 2001
+++ lisp/xt-mouse.el    Thu Nov 29 12:28:00 2001
@@ -146,13 +146,17 @@
                 ;; differently (see xc/programs/xterm/button.c,
                 ;; function EditorButton), and there seems to come in
                 ;; a release-event only, no down-event.
-                (cond ((>= type 64)
-                       (format "mouse-%d" (- type 60)))
+                (cond ;;((>= type 64)
+                      ;;       (format "mouse-%d" (- type 60)))
                       ((= type 3)
-                       (format "mouse-%d" (+ 1 xterm-mouse-last)))
+                        (format "mouse-%d" (+ 1 xterm-mouse-last)))
                       (t
-                       (setq xterm-mouse-last type)
-                       (format "down-mouse-%d" (+ 1 type)))))))
+                       (setq xterm-mouse-last (if (>= type 64)
+                                                   (- type 60 1)
+                                                 type))
+                       (format "down-mouse-%d" (if (>= type 64)
+                                                    (- type 60)
+                                                  (+ 1 type))))))))
     (setq xterm-mouse-x x
          xterm-mouse-y y)
     (list mouse
----------------------------------------------------------------------


-- 
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]