Ensure query strings and info strings are printable
authorPhilippe Brochard <pbrochard@common-lisp.net>
Wed, 31 Jul 2013 15:04:59 +0000 (31 17:04 +0200)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Wed, 31 Jul 2013 15:04:59 +0000 (31 17:04 +0200)
src/clfswm-info.lisp
src/clfswm-query.lisp

index 836ce43..ca9983b 100644 (file)
@@ -96,7 +96,7 @@
                         *pixmap-buffer* (info-gc info)
                         (- (+ (info-ilw info) (* posx (info-ilw info))) (info-x info))
                         (info-y-display-coords info posy)
-                        (format nil "~A" line)))
+                        (ensure-printable (format nil "~A" line))))
             (+ posx (length line))))
     (clear-pixmap-buffer (info-window info) (info-gc info))
     (loop for line in (info-list info)
index 091eda5..0181374 100644 (file)
     (xlib:draw-glyphs *pixmap-buffer* *query-gc*
                      (+ 10 dec)
                      (+ (* 2 (+ (xlib:max-char-ascent *query-font*) (xlib:max-char-descent *query-font*))) 5)
-                     *query-string*)
+                     (ensure-printable *query-string*))
     (setf (xlib:gcontext-foreground *query-gc*) (get-color *query-cursor-color*))
     (xlib:draw-line *pixmap-buffer* *query-gc*
                    (+ 10 (* *query-pos* (xlib:max-char-width *query-font*)) dec)