diff options
author | Jason Creighton <jcreigh@gmail.com> | 2007-04-30 06:38:59 +0200 |
---|---|---|
committer | Jason Creighton <jcreigh@gmail.com> | 2007-04-30 06:38:59 +0200 |
commit | d2606cda76d70124278df46293d9d40d5cdbe537 (patch) | |
tree | 500f4beeb8fc6d2420a9e4c5ab2d1cc99595fed3 /Main.hs | |
parent | 904630eb205fb37ee3526148efc2391829088541 (diff) | |
download | metatile-d2606cda76d70124278df46293d9d40d5cdbe537.tar metatile-d2606cda76d70124278df46293d9d40d5cdbe537.zip |
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".
darcs-hash:20070430043859-b9aa7-9467ff583ec95144e5baa088e4b1536a725e7bc6
Diffstat (limited to 'Main.hs')
-rw-r--r-- | Main.hs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |