diff options
author | Don Stewart <dons@galois.com> | 2008-02-06 20:48:58 +0100 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2008-02-06 20:48:58 +0100 |
commit | 5bfcb6131b40139698d1f0ee7db4060f6facb034 (patch) | |
tree | 46720032c0fd32a95346f037ab14beb8a2696f82 /XMonad/Main.hs | |
parent | f79eb82479d91f6532d2108e7c0d1e04f7b05b95 (diff) | |
download | metatile-5bfcb6131b40139698d1f0ee7db4060f6facb034.tar metatile-5bfcb6131b40139698d1f0ee7db4060f6facb034.zip |
Lift initColor exceptions into Maybe
We should audit all X11 Haskell lib calls we make for whether
they throw undocumented exceptions, and then banish that.
darcs-hash:20080206194858-cba2c-143b6edd906a9ddfcc8ff85b4a42ebea0f3462bf
Diffstat (limited to 'XMonad/Main.hs')
-rw-r--r-- | XMonad/Main.hs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/XMonad/Main.hs b/XMonad/Main.hs index 2c22792..0450a7c 100644 --- a/XMonad/Main.hs +++ b/XMonad/Main.hs @@ -28,6 +28,7 @@ import Graphics.X11.Xlib hiding (refreshKeyboardMapping) import Graphics.X11.Xlib.Extras import XMonad.Core +import qualified XMonad.Config as Default import XMonad.StackSet (new, floating, member) import qualified XMonad.StackSet as W import XMonad.Operations @@ -46,8 +47,14 @@ xmonad initxmc = do rootw <- rootWindow dpy dflt xinesc <- getCleanedScreenInfo dpy - nbc <- initColor dpy $ normalBorderColor xmc - fbc <- initColor dpy $ focusedBorderColor xmc + nbc <- do v <- initColor dpy $ normalBorderColor xmc + ~(Just nbc_) <- initColor dpy $ normalBorderColor Default.defaultConfig + return (fromMaybe nbc_ v) + + fbc <- do v <- initColor dpy $ focusedBorderColor xmc + ~(Just fbc_) <- initColor dpy $ focusedBorderColor Default.defaultConfig + return (fromMaybe fbc_ v) + hSetBuffering stdout NoBuffering args <- getArgs |