diff lisp/xt-mouse.el @ 84769:cbcb89640ef2

* xt-mouse.el (xterm-mouse-mode): Re-enable suspend-tty-functions. * term.c (Fsuspend_tty): Run suspend-tty-functions before cleaning up the tty state.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 21 Sep 2007 20:19:10 +0000
parents b3e66fa9fc66
children 58c70d072b21 14c4a6aac623
line wrap: on
line diff
--- a/lisp/xt-mouse.el	Fri Sep 21 17:10:48 2007 +0000
+++ b/lisp/xt-mouse.el	Fri Sep 21 20:19:10 2007 +0000
@@ -214,15 +214,8 @@
 	(add-hook 'delete-frame-functions 'xterm-mouse-handle-delete-frame)
 	
 	;; Restore normal mouse behaviour outside Emacs.
-	
-	;; Temporarily disable this hook, it does not work, when
-	;; `suspend-tty' calls `suspend-tty-functions' the tty->output
-	;; is already set to 0 so the 'send-string-to-terminal' call
-	;; in `turn-off-xterm-mouse-tracking-on-terminal' will result
-	;; in a crash.
-        ;; (add-hook 'suspend-tty-functions
-	;;   'turn-off-xterm-mouse-tracking-on-terminal)
-
+        (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)
@@ -234,8 +227,8 @@
     (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 '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)