From 11b4a88e621c886abac816b584c7b3dca0bcb742 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Wed, 17 Dec 2014 12:14:00 -0500 Subject: [PATCH] Use the (more reliable) plumber mechanism instead of exit-handler --- ansi/test-raw.rkt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ansi/test-raw.rkt b/ansi/test-raw.rkt index e4355e6..23fb6fe 100644 --- a/ansi/test-raw.rkt +++ b/ansi/test-raw.rkt @@ -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)))