Ignore incompliant wm-class strings
authorPhilippe Brochard <pbrochard@common-lisp.net>
Sat, 19 Oct 2013 15:31:58 +0000 (19 17:31 +0200)
committerPhilippe Brochard <pbrochard@common-lisp.net>
Sat, 19 Oct 2013 15:31:58 +0000 (19 17:31 +0200)
src/xlib-util.lisp

index 20bcf5f..3081053 100644 (file)
@@ -1017,8 +1017,10 @@ they should be windows. So use this function to make a window out of them."
 ;;; Windows wm class and name tests
 (defmacro defun-equal-wm-class (symbol class)
   `(defun ,symbol (window)
-     (when (xlib:window-p window)
-       (string-equal (xlib:get-wm-class window) ,class))))
+     (ignore-errors   ;; Ignore incompliant wm-class strings
+       (when (xlib:window-p window)
+         (string-equal (xlib:get-wm-class window) ,class)))))
+
 
 (defmacro defun-equal-wm-name (symbol name)
   `(defun ,symbol (window)