emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/xt-mouse.el,v


From: Dan Nicolaescu
Subject: [Emacs-diffs] Changes to emacs/lisp/xt-mouse.el,v
Date: Sat, 15 Sep 2007 00:27:41 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Dan Nicolaescu <dann>   07/09/15 00:27:40

Index: xt-mouse.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/xt-mouse.el,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- xt-mouse.el 4 Sep 2007 23:28:47 -0000       1.46
+++ xt-mouse.el 15 Sep 2007 00:27:37 -0000      1.47
@@ -208,9 +208,32 @@
   (if xterm-mouse-mode
       ;; Turn it on
       (progn
+       ;; Frame creation and deletion.
+       (add-hook 'after-make-frame-functions 
+                 'turn-on-xterm-mouse-tracking-on-terminal)
+       (add-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame)
+       
+       ;; Restore normal mouse behaviour outside Emacs.
+       (add-hook 'suspend-tty-functions 
+                 'turn-off-xterm-mouse-tracking-on-terminal)
+       (add-hook 'resume-tty-functions 
+                 'turn-on-xterm-mouse-tracking-on-terminal)
+       (add-hook 'suspend-hook 'turn-off-xterm-mouse-tracking)
+       (add-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking)
+       (add-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking)
        (setq mouse-position-function #'xterm-mouse-position-function)
        (turn-on-xterm-mouse-tracking))
     ;; Turn it off
+    (remove-hook 'after-make-frame-functions 
+                'turn-on-xterm-mouse-tracking-on-terminal)
+    (remove-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame)
+    (remove-hook 'suspend-tty-functions 
+                'turn-off-xterm-mouse-tracking-on-terminal)
+    (remove-hook 'resume-tty-functions 
+                'turn-on-xterm-mouse-tracking-on-terminal)
+    (remove-hook 'suspend-hook 'turn-off-xterm-mouse-tracking)
+    (remove-hook 'suspend-resume-hook 'turn-on-xterm-mouse-tracking)
+    (remove-hook 'kill-emacs-hook 'turn-off-xterm-mouse-tracking)
     (turn-off-xterm-mouse-tracking 'force)
     (setq mouse-position-function nil)))
 




reply via email to

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