From 0f9995691a5b7d6e3a4c17b4602c6f41e30e3119 Mon Sep 17 00:00:00 2001 From: Philippe Brochard Date: Mon, 10 Sep 2012 09:37:20 +0200 Subject: [PATCH] src/*.lisp: polish X error handling. --- src/clfswm.lisp | 12 ++++++------ src/xlib-util.lisp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/clfswm.lisp b/src/clfswm.lisp index ea8389d..73d19b7 100644 --- a/src/clfswm.lisp +++ b/src/clfswm.lisp @@ -147,15 +147,15 @@ ;; ignore asynchronous window errors ((and asynchronous (find error-key '(xlib:window-error xlib:drawable-error xlib:match-error))) - (format t "~&Ignoring XLib asynchronous error: ~s~%" error-key)) + #+:xlib-debug (format t "~&Ignoring XLib asynchronous error: ~s~%" error-key)) ((eq error-key 'xlib:access-error) (write-line "~&Another window manager is running.") (throw 'exit-clfswm nil)) - ;; all other asynchronous errors are printed. - (asynchronous - (format t "~&Caught Asynchronous X Error: ~s ~s" error-key key-vals)) - (t - (apply 'error error-key :display display :error-key error-key key-vals)))) + ;; all other asynchronous errors are printed. + (asynchronous + #+:xlib-debug (format t "~&Caught Asynchronous X Error: ~s ~s" error-key key-vals)) + (t + (apply 'error error-key :display display :error-key error-key key-vals)))) (defun main-loop () diff --git a/src/xlib-util.lisp b/src/xlib-util.lisp index cfc1f82..b5b77fc 100644 --- a/src/xlib-util.lisp +++ b/src/xlib-util.lisp @@ -73,7 +73,7 @@ Window types are in +WINDOW-TYPES+.") "Prevent Xlib errors" #-:xlib-debug (declare (ignore name tag)) `(handler-case - (with-simple-restart (top-level "Return to clfswm's top level") + (progn ,@body) (xlib::x-error (c) #-:xlib-debug (declare (ignore c)) -- 2.11.4.GIT