move initColor to Operations and only store the Pixel value of colors

Moving initColor to Operations allows it to be used by extensions.

The Pixel component of the color is the only thing we need, so it's simpler
just to deal with that.
This commit is contained in:
Jason Creighton
2007-06-13 23:45:01 +00:00
parent 753b42ae65
commit 8169445cbd
3 changed files with 11 additions and 7 deletions

View File

@@ -42,12 +42,11 @@ main :: IO ()
main = do
dpy <- openDisplay ""
let dflt = defaultScreen dpy
initcolor c = fst `liftM` allocNamedColor dpy (defaultColormap dpy dflt) c
rootw <- rootWindow dpy dflt
xinesc <- getScreenInfo dpy
nbc <- initcolor normalBorderColor
fbc <- initcolor focusedBorderColor
nbc <- initColor dpy normalBorderColor
fbc <- initColor dpy focusedBorderColor
hSetBuffering stdout NoBuffering
args <- getArgs