Use the (more reliable) plumber mechanism instead of exit-handler

This commit is contained in:
Tony Garnock-Jones 2014-12-17 12:14:00 -05:00
parent 7ef6d4fe9a
commit 11b4a88e62
1 changed files with 3 additions and 4 deletions

View File

@ -9,10 +9,9 @@
(define (main)
(tty-raw!)
(define old-exit-handler (exit-handler))
(exit-handler (lambda (v)
(display (reset-mode x11-any-event-mouse-tracking-mode))
(old-exit-handler v)))
(plumber-add-flush! (current-plumber)
(lambda (handle)
(display (reset-mode x11-any-event-mouse-tracking-mode))))
(for-each display (list (set-mode x11-any-event-mouse-tracking-mode)))