goose121.clx-truetype/clx-utils.lisp
2012-09-15 00:09:32 +03:00

13 lines
350 B
Common Lisp

;;; Utils
(in-package #:clx-truetype)
(defun drawable-screen (drawable)
(typecase drawable
(xlib:drawable
(dolist (screen (xlib:display-roots (xlib:drawable-display drawable)))
(when (xlib:drawable-equal (xlib:screen-root screen) (xlib:drawable-root drawable))
(return screen))))
(xlib:screen drawable)
(t nil)))