configurable border colors

This also fixes a bug where xmonad was assuming a 24-bit display, and just
using, eg, 0xff0000 as an index into a colormap without querying the X server
to determine the proper pixel value for "red".
This commit is contained in:
Jason Creighton
2007-04-30 04:38:59 +00:00
parent 8097060259
commit bdbca84bcd
4 changed files with 17 additions and 7 deletions

View File

@@ -35,10 +35,14 @@ main :: IO ()
main = do
dpy <- openDisplay ""
let dflt = defaultScreen dpy
initcolor c = fst `liftM` allocNamedColor dpy (defaultColormap dpy dflt) c
rootw <- rootWindow dpy dflt
wmdelt <- internAtom dpy "WM_DELETE_WINDOW" False
wmprot <- internAtom dpy "WM_PROTOCOLS" False
xinesc <- getScreenInfo dpy
nbc <- initcolor normalBorderColor
fbc <- initcolor focusedBorderColor
let st = XState
{ display = dpy
@@ -52,6 +56,8 @@ main = do
, workspace = W.empty workspaces (length xinesc)
, defaultLayoutDesc = startingLayoutDesc
, layoutDescs = M.empty
, normalBorder = nbc
, focusedBorder = fbc
}
xSetErrorHandler -- in C, I'm too lazy to write the binding