Skip to content

Commit

Permalink
add a comment to clisp's get-wm-class workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn committed Oct 18, 2008
1 parent 854b572 commit 2216a85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions workarounds.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
(defun get-wm-class (window)
(let ((value (get-property window :WM_CLASS :type :STRING :result-type 'string :transform #'card8->char)))
(when value
;; Buggy clients may not comply with the format, so deal with
;; the unexpected.
(let* ((first-zero (position (load-time-value (card8->char 0)) (the string value)))
(second-zero (and first-zero
(position (load-time-value (card8->char 0)) (the string value) :start (1+ first-zero))))
Expand Down

0 comments on commit 2216a85

Please sign in to comment.