Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

let lookup-color accept xlib:color type #2

Merged
merged 1 commit into from

2 participants

@robot-beethoven

also let update-color-map use internal lookup-color (instead of xlib:lookup-color),
like the rest of stumpwm. this allows xlib:colors everwhere!

@robot-beethoven robot-beethoven let lookup-color accept xlib:color type
also let update-color-map use internal lookup-color (instead of xlib:lookup-color),
like the rest of stumpwm.  this allows xlib:colors everwhere!
612b7fb
@sabetts sabetts merged commit 17a100a into stumpwm:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 7, 2012
  1. @robot-beethoven

    let lookup-color accept xlib:color type

    robot-beethoven authored Beau Brueggemann committed
    also let update-color-map use internal lookup-color (instead of xlib:lookup-color),
    like the rest of stumpwm.  this allows xlib:colors everwhere!
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 color.lisp
View
6 color.lisp
@@ -66,7 +66,9 @@ then call (update-color-map).")
(xlib:alloc-color (xlib:screen-default-colormap (screen-number screen)) color))
(defun lookup-color (screen color)
- (xlib:lookup-color (xlib:screen-default-colormap (screen-number screen)) color))
+ (cond
+ ((typep color 'xlib:color) color)
+ (t (xlib:lookup-color (xlib:screen-default-colormap (screen-number screen)) color))))
;; Normal colors are dimmed and bright colors are intensified in order
;; to more closely resemble the VGA pallet.
@@ -75,7 +77,7 @@ then call (update-color-map).")
(let ((scm (xlib:screen-default-colormap (screen-number screen))))
(labels ((map-colors (amt)
(loop for c in *colors*
- as color = (xlib:lookup-color scm c)
+ as color = (lookup-color screen c)
do (adjust-color color amt)
collect (xlib:alloc-color scm color))))
(setf (screen-color-map-normal screen) (apply #'vector (map-colors -0.25))
Something went wrong with that request. Please try again.