New patches: [unrevert anon**20100203013249 Ignore-this: 19f20285497ae943998f1cff07e0462d61869d34 ] { hunk ./XMonad/Layout/Decoration.hs 43 import XMonad.Core import XMonad.Operations import XMonad.Stack -import XMonad.Layout ( WindowMessage(FocusWindow), doMessage ) +import XMonad.Layout ( WindowMessage(..), doMessage ) import XMonad.Layout.LayoutModifier import XMonad.Layout.HandleLittleThings ( getName ) import XMonad.Layout.ManageWindows hunk ./XMonad/Layout/Decoration.hs 231 return (dwrs_to_wrs nd, setm dm `fmap` ms') _ -> do let toAdd = toadd a wrs + toDel = todel d dwrs ndwrs = zip toAdd $ repeat (Nothing,Nothing) hunk ./XMonad/Layout/Decoration.hs 233 + deleteDecos (map snd toDel) ndecos <- resync s ms' wrs (ndwrs ++ del_dwrs d dwrs) wrs hunk ./XMonad/Layout/Decoration.hs 235 - processState ms' (s {decos = ndecos, rect = sc }) + processState ms' (s {decos = ndecos }) | otherwise = runLayout sc stack where hunk ./XMonad/Layout/Decoration.hs 244 del_dwrs = listFromList get_w notElem find_dw i = fst . snd . flip (!!) i toadd a = filter (flip elem a . fst) + todel d = filter (flip elem d . get_w) check_dwr dwr = case dwr of (Nothing, Just dr) -> do dw <- createDecoWindow t dr hunk ./XMonad/Layout/Decoration.hs 274 dwrs_to_wrs = remove_stacked [] . foldr insert_dwr [] - processState ms s = updateDecos (maybe stack id ms) sh t (font s) (decos s) >> - return (dwrs_to_wrs (decos s), Just $ setm (Decoration (I $ Just s) sh t ds) (maybe stack id ms)) + processState ms s = let s' = if sc == rect s then s else s { rect = sc } in + updateDecos (maybe stack id ms) sh t (font s) (decos s) >> + return (dwrs_to_wrs (decos s), Just $ setm (Decoration (I $ Just s') sh t ds) (maybe stack id ms)) handleMess dec@(Decoration (I (Just s)) sh t ds) ms m | Just e <- fromMessage m :: Maybe Event = do hunk ./XMonad/Layout/Decoration.hs 292 if nodeco s == ws then return Nothing else return $ Just $ Just $ setm (Decoration (I $ Just (s { nodeco = ws})) sh t ds) ms + | Just (RemoveWindow w) <- fromMessage m = + case filterS (/=w) ms of + Just _ -> return Nothing + _ -> do deleteDecos (map snd $ decos s) + return $ Just $ Just $ setm (Decoration (I Nothing) sh t ds) ms handleMess _ _ _ = return Nothing hunk ./XMonad/Layout/Decoration.hs 317 handleMouseDrag :: DecorationState -> Event -> X (Maybe SomeMessage) handleMouseDrag (DS dwrs _ _ sc) ButtonEvent { ev_window = ew , ev_event_type = et - , ev_x_root = ex - , ev_y_root = ey } + , ev_x = ex + , ev_y = ey } | et == buttonPress hunk ./XMonad/Layout/Decoration.hs 320 - , Just ((mainw,r),_) <- lookFor ew dwrs = do + , Just ((mainw,r),(_,Just dr)) <- lookFor ew dwrs = do mouseDrag (\x y -> do hunk ./XMonad/Layout/Decoration.hs 322 - let r' = Rectangle (x - (fi ex - rect_x r)) - (y - (fi ey - rect_y r)) + let nx = fi x - ex + ny = fi y + fi (rect_height dr) - ey + r' = Rectangle (fi nx) (fi ny) (rect_width r) (rect_height r) sendMessage (SetRectangle $ toRationalRect sc r') hunk ./XMonad/Layout/Decoration.hs 390 updateDeco _ _ _ _ (_,(Just w,Nothing)) = hideWindow w updateDeco _ _ _ _ _ = return () +deleteDecos :: [DecoWin] -> X () +deleteDecos = deleteWindows . catMaybes . map fst + -- | True if the window is in the 'Stack'. The 'Window' comes second -- to facilitate list processing, even though @w \`isInStack\` s@ won't -- work...;) hunk ./XMonad/Layout/Decoration.hs 447 shrinkText :: DefaultShrinker shrinkText = DefaultShrinker - -- | Given a function to be applied to each member of a list, and a -- function to check a condition by processing this transformed member -- with the members of a list, you get the list of members that hunk ./XMonad/Layout/Float.hs 84 wrs = genRectsWithRatios sc l . zip ws $ repeat sc return (wrs, Nothing) - handleMessage l@(SF b _) s m - | Just (FloatingWins wrs) <- fromMessage m = + handleMessage l@(SF b (I i)) s m + | Just (WinsGeometry wrs) <- fromMessage m = + if wrs == i then return Nothing else return $ Just $ Just $ setLayout (Layout $ SF b (I wrs)) s | Just (CrossingEvent {}) <- fromMessage m = if b then handleDefault l s m else return Nothing hunk ./XMonad/Layout/ManageWindows.hs 75 } deriving ( Show, Read ) data RationalRect = RationalRect Rational Rational Rational Rational - deriving ( Read, Show ) + deriving ( Read, Show, Eq ) -- | No named fields to make the 'Rule' easily readable. data Rule = Rule Property Action hunk ./XMonad/Layout/ManageWindows.hs 109 ] data ManageWindowsMsg - = FloatingWins [(Window, RationalRect)] + = WinsGeometry [(Window, RationalRect)] | DoFloatWins [(Window, RationalRect)] | DoIgnoreWins [(Window, RationalRect)] | NoDecoWins [Window] hunk ./XMonad/Layout/ManageWindows.hs 134 instance LayoutModifier ManageWindows Window where redoLayout (MW (MWS _ wps rls)) r s = do - let (rm,add) = curry diff (map fst wps) $ integrate s + let (rm,add) = curry diff (map fst wps) (integrate s) newlist = filter (not . flip elem rm . fst) wps new <- mapM (getWinProps r) add hunk ./XMonad/Layout/ManageWindows.hs 137 - let list = newlist ++ new + let list = new ++ newlist wprls = map (\(win,ps) -> let indxs = concatMap (flip elemIndices (map prop rls)) (props ps) in ((win,ps), nub $ map (act . (!!) rls) indxs) hunk ./XMonad/Layout/ManageWindows.hs 146 ignore = map fst . filter (elem DoIgnore . snd) $ wprls nodeco = map fst . filter (elem NoDeco . snd) $ wprls handle m st = fromMM st <$> doMessage st (SomeMessage m) - s1 <- mapSM (handle (FloatingWins . map (second rrect) $ list )) s + s1 <- mapSM (handle (WinsGeometry . map (second rrect) $ list )) s s2 <- mapSM (handle (DoFloatWins . map (second rrect) $ float )) s1 s3 <- mapSM (handle (DoIgnoreWins . map (second rrect) $ ignore)) s2 s' <- mapSM (handle (NoDecoWins . nub . map fst $ nodeco ++ ignore)) s3 hunk ./XMonad/Layout/ManageWindows.hs 161 | Just TraceWinProp <- fromMessage m = trace (show wp ) >> return Nothing where wp = filter ((==) (focus s) . fst) wps + handleMess (MW (MWS rect wps rls)) s m hunk ./XMonad/Layout/ManageWindows.hs 163 - | Just (SetRectangle nr) <- fromMessage m = - return $ Just $ Just $ setm (MW $ MWS rect (update nr) rls) s + | Just (SetRectangle nr) <- fromMessage m :: Maybe ManageWindowsMsg = + return $ Just $ Just $ setm (MW $ MWS rect (update (focus s) nr) rls) s + | Just (ConfigureWindow nr w) <- fromMessage m = + return $ Just $ Just $ setm (MW $ MWS rect (update w $ toRationalRect rect nr) rls) s where hunk ./XMonad/Layout/ManageWindows.hs 168 - update nr = flip map wps $ \(w,r) -> if w == focus s then (w,WP nr $ props r) else (w,r) + update win nr = flip map wps $ \(w,r) -> if win == w then (w,WP nr $ props r) else (w,r) handleMess (MW (MWS rect wps rls)) s m | Just (IncreaseRight wh) <- fm = res $ RationalRect x y (w + nw wh) h hunk ./XMonad/Layout.hs 22 Full(..), Grid(..), Mirror(..), DefaultMessage(..), handleDefault, WindowMessage(..), ToLevel(..), toLevel, mirrorRect, splitVertically, splitHorizontally, - doMessage, setl, mapMMFL, toggleLayouts, ToggleLayout(..), + doMessage, broadcastMessage, setl, mapMMFL, toggleLayouts, ToggleLayout(..), StackLayouts(..), (>->), tile ) where hunk ./XMonad/Layout.hs 37 import Data.Typeable ( cast ) import Data.Maybe ( catMaybes ) import Control.Arrow (second) -import Control.Monad +import Control.Monad.State ------------------------------------------------------------------------ hunk ./XMonad/Layout.hs 58 toLevel :: Message m => Int -> m -> ToLevel toLevel i m = ToLevel i (SomeMessage m) -data WindowMessage a = Insert a | InsertLowest a | FocusWindow a | SwapWithWindow a | MoveToWindow a +data WindowMessage a = Insert a | InsertLowest a | FocusWindow a + | SwapWithWindow a | MoveToWindow a + | RemoveWindow a | ConfigureWindow Rectangle a deriving ( Read, Show, Typeable ) instance Typeable a => Message (WindowMessage a) hunk ./XMonad/Layout.hs 118 if isSiblingOfFocus w s && focus (focusDownS s) == w then return $ Just $ Just $ swapDownS s else case deleteFocusS s of - Nothing -> return Nothing - Just s' -> do ms'' <- doMessage (selectS (==w) s') (SomeMessage $ Insert $ focus s) - return ms'' + Nothing -> broadcastMessage (RemoveWindow $ focus s) >> return Nothing + Just s' -> doMessage (selectS (==w) s') (SomeMessage $ Insert $ focus s) handleDefault _ s m | Just (ToLevel 0 m') <- fromMessage m = doMessage s m' handleDefault _ (Stack n y a b c) m hunk ./XMonad/Layout.hs 180 Nothing -> return Nothing sendMessageToOne _ _ = return Nothing +-- | Throw a message to every 'Stack' and update the 'XState' without +-- refreshing. +broadcastMessage :: Message a => a -> X () +broadcastMessage m = withWindowStack $ \s -> do + s' <- mapSM handle s + modify (\st -> st { windowset = Just s'}) + where handle s = doMessage s (SomeMessage m) `catchX` return Nothing >>= + return . fromMM s + -- | The builtin tiling mode of xmonad. data Grid a = Grid Int deriving (Show, Read) hunk ./XMonad/Main.hsc 37 import XMonad.Core import qualified XMonad.Config as Default +import XMonad.Layout import XMonad.Operations import XMonad.Stack hunk ./XMonad/Main.hsc 40 +import XMonad.Util.Font import System.IO hunk ./XMonad/Main.hsc 221 -- configure a window handle e@(ConfigureRequestEvent {ev_window = w}) = withDisplay $ \dpy -> do bw <- asks (borderWidth . config) + wa <- io $ getWindowAttributes dpy w io $ configureWindow dpy w (ev_value_mask e) $ WindowChanges { wc_x = ev_x e , wc_y = ev_y e hunk ./XMonad/Main.hsc 230 , wc_border_width = fromIntegral bw , wc_sibling = ev_above e , wc_stack_mode = ev_detail e } + io $ allocaXEvent $ \ev -> do + setEventType ev configureNotify + setConfigureEvent ev w w + (ev_x e) (ev_y e) (ev_width e) + (ev_height e) (ev_border_width e) none (wa_override_redirect wa) + sendEvent dpy w False 0 ev io $ sync dpy False hunk ./XMonad/Main.hsc 237 - + broadcastMessage (ConfigureWindow (Rectangle (fromIntegral $ ev_x e) (fromIntegral $ ev_y e) + (fromIntegral $ ev_width e) + (fromIntegral $ ev_height e) + ) w) -- configuration changes in the root may mean display settings have changed handle (ConfigureEvent {ev_window = w}) = whenX (isRoot w) $ return () hunk ./XMonad/Main.hsc 279 kc <- io $ keysymToKeycode dpy sym -- "If the specified KeySym is not defined for any KeyCode, -- XKeysymToKeycode() returns zero." - when (kc /= '\0') $ mapM_ (grab kc . (mask .|.)) =<< extraModifiers + when (kc /= 0) $ mapM_ (grab kc . (mask .|.)) =<< extraModifiers -- | XXX comment me grabButtons :: X () hunk ./XMonad/Operations.hs 22 module XMonad.Operations where import XMonad.Core -import XMonad.Layout (Full(..), doMessage, WindowMessage(..) ) +import XMonad.Layout (Full(..), doMessage, broadcastMessage, WindowMessage(..) ) import XMonad.Stack import Data.Maybe hunk ./XMonad/Operations.hs 34 import Control.Applicative import Control.Monad.Reader import Control.Monad.State -import qualified Control.Exception as C hunk ./XMonad/Operations.hs 35 -import System.IO import System.Mem ( performGC ) hunk ./XMonad/Operations.hs 36 -import System.Mem.Weak ( addFinalizer ) import System.Posix.Process (executeFile) import Graphics.X11.Xlib import Graphics.X11.Xinerama (getScreenInfo) hunk ./XMonad/Operations.hs 65 -- list, on whatever workspace it is. -- unmanage :: Window -> X () -unmanage w = windows $ \ms -> case ms of - Nothing -> Nothing - Just s -> filterS (/=w) s +unmanage w = do + broadcastMessage (RemoveWindow w) + windows $ \ms -> case ms of + Nothing -> Nothing + Just s -> filterS (/=w) s -- | Kill the currently focused client. If we do kill it, we'll get a -- delete notify back from X. hunk ./XMonad/Operations.hs 147 isMouseFocused <- asks mouseFocused unless (isMouseFocused && False) $ clearEvents enterWindowMask + io $ performGC -- to collect anything that needs finalizing -- | setWMState. set the WM_STATE property setWMState :: Window -> Int -> X () hunk ./XMonad/Operations.hs 320 ms' <- doMessage s (SomeMessage a) `catchX` return Nothing whenJust ms' $ \s' -> windows (const $ s') --- | Throw a message to every 'Stack' and update the 'XState' without --- refreshing. -broadcastMessage :: Message a => a -> X () -broadcastMessage m = withWindowStack $ \s -> do - s' <- mapSM handle s - modify (\st -> st { windowset = Just s'}) - where handle s = doMessage s (SomeMessage m) `catchX` return Nothing >>= - return . fromMM s - ------------------------------------------------------------------------ -- Utilities hunk ./XMonad/Operations.hs 345 nlm <- asks (numlockMask . config) return (complement (nlm .|. lockMask) .&. km) --- | Get the Pixel value for a named color -initColor :: Display -> String -> IO (Maybe Pixel) -initColor dpy c = C.handle (\_ -> return Nothing) $ Just <$> doInit - where doInit = do p <- color_pixel . fst <$> allocNamedColor dpy colormap c - addFinalizer p (freeColors dpy colormap [p] 0) - return p - colormap = defaultColormap dpy (defaultScreen dpy) - ------------------------------------------------------------------------ -- | @restart name resume@. Attempt to restart xmonad by executing the program hunk ./XMonad/Util/Font.hsc 22 , initXMF , initCoreFont , initUtf8Font +#ifdef XFT + , initXftFont +#endif , Align (..) hunk ./XMonad/Util/Font.hsc 26 + , initColor , stringPosition , textWidthXMF , textExtentsXMF hunk ./XMonad/Util/Font.hsc 32 , printStringXMF , stringToPixel + , withColors , decodeInput , encodeOutput ) where hunk ./XMonad/Util/Font.hsc 38 import XMonad.Core -import XMonad.Operations ( initColor ) import Graphics.X11 import Graphics.X11.Xlib.Extras hunk ./XMonad/Util/Font.hsc 40 +import qualified Control.Exception as C import Control.Monad.Reader import Foreign hunk ./XMonad/Util/Font.hsc 45 import Control.Applicative -import System.Mem.Weak ( addFinalizer ) import Data.Maybe hunk ./XMonad/Util/Font.hsc 46 +import Data.IORef #ifdef XFT import Data.List hunk ./XMonad/Util/Font.hsc 54 import Graphics.X11.Xrender #endif -#if defined XFT || defined UTF8 +#if defined XFT || defined UTF_8 import Codec.Binary.UTF8.String (encodeString, decodeString) #endif hunk ./XMonad/Util/Font.hsc 58 +-- $usage +-- See "Xmonad.Layout.Tabbed" or "XMonad.Prompt" for usage examples + -- Hide the Core Font/Xft switching here data XMonadFont = Core FontStruct | Utf8 FontSet hunk ./XMonad/Util/Font.hsc 68 | Xft XftFont #endif --- $usage --- See "Xmonad.Layout.Tabbed" or "XMonad.Prompt" for usage examples +type FontCache = [(String, XMonadFont)] hunk ./XMonad/Util/Font.hsc 70 --- | Get the Pixel value for a named color: if an invalid name is --- given the black pixel will be returned. -stringToPixel :: (Functor m, MonadIO m) => Display -> String -> m Pixel -stringToPixel d s = fromMaybe fallBack <$> io getIt - where getIt = initColor d s - fallBack = blackPixel d (defaultScreen d) +{-# NOINLINE fontCache #-} +fontCache :: IORef FontCache +fontCache = unsafePerformIO $ newIORef [] hunk ./XMonad/Util/Font.hsc 74 +getCachedFont :: String -> IO (Maybe XMonadFont) +getCachedFont n = lookup n `fmap` readIORef fontCache + +putCachedFont :: String -> XMonadFont -> IO () +putCachedFont n f = modifyIORef fontCache $ \c -> (n, f) : c -- | Given a fontname returns the font structure. If the font name is -- not valid the default font will be loaded and returned. hunk ./XMonad/Util/Font.hsc 85 initCoreFont :: String -> X FontStruct initCoreFont s = do d <- asks display - x <- io $ catch (getIt d) (fallBack d) - io $ addFinalizer x (freeFont d x) - return x - where getIt d = loadQueryFont d s - fallBack d = const $ loadQueryFont d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" + f <- io $ catch (getIt d) (fallBack d) + io $ putCachedFont s (Core f) + return f + where getIt d = loadQueryFont d s + fallBack d = const $ loadQueryFont d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" initUtf8Font :: String -> X FontSet initUtf8Font s = do hunk ./XMonad/Util/Font.hsc 94 d <- asks display - (_,_,fs) <- io $ catch (getIt d) (fallBack d) - io $ addFinalizer fs (freeFontSet d fs) - return fs + (_,_,f) <- io $ catch (getIt d) (fallBack d) + io $ putCachedFont s (Utf8 f) + return f where getIt d = createFontSet d s fallBack d = const $ createFontSet d "-misc-fixed-*-*-*-*-10-*-*-*-*-*-*-*" hunk ./XMonad/Util/Font.hsc 100 +#ifdef XFT +initXftFont :: String -> X XftFont +initXftFont s = do + d <- asks display + f <- io $ xftFontOpen dpy (defaultScreenOfDisplay d) (drop 4 s) + io $ putCachedFont s (Xft f) + return f +#endif + -- | When initXMF gets a font name that starts with 'xft:' it switchs to the Xft backend -- Example: 'xft: Sans-10' initXMF :: String -> X XMonadFont hunk ./XMonad/Util/Font.hsc 112 -initXMF s = +initXMF s = do + f <- io $ getCachedFont s + case f of + Just f' -> return f' + Nothing -> #ifdef XFT hunk ./XMonad/Util/Font.hsc 118 - if xftPrefix `isPrefixOf` s then - do dpy <- asks display - xftdraw <- io $ xftFontOpen dpy (defaultScreenOfDisplay dpy) (drop (length xftPrefix) s) - io $ addFinalizer xftdraw (xftFontClose dpy xftdraw) - return (Xft xftdraw) - else + let xftPrefix = "xft:" in + if xftPrefix `isPrefixOf` s then + fmap Xft $ initXftFont s + else #endif hunk ./XMonad/Util/Font.hsc 123 -#ifdef UTF8 - fmap Utf8 $ initUtf8Font s +#ifdef UTF_8 + fmap Utf8 $ initUtf8Font s #else hunk ./XMonad/Util/Font.hsc 126 - fmap Core $ initCoreFont s -#endif -#ifdef XFT - where xftPrefix = "xft:" + fmap Core $ initCoreFont s #endif textWidthXMF :: MonadIO m => Display -> XMonadFont -> String -> m Int hunk ./XMonad/Util/Font.hsc 174 -> Position -> Position -> String -> m () printStringXMF d p (Core fs) gc fc bc x y s = io $ do setFont d gc $ fontFromFontStruct fs - [fc',bc'] <- mapM (stringToPixel d) [fc,bc] - setForeground d gc fc' - setBackground d gc bc' - drawImageString d p gc x y s + withColors d [fc, bc] $ \[fc', bc'] -> do + setForeground d gc fc' + setBackground d gc bc' + drawImageString d p gc x y s printStringXMF d p (Utf8 fs) gc fc bc x y s = io $ do hunk ./XMonad/Util/Font.hsc 179 - [fc',bc'] <- mapM (stringToPixel d) [fc,bc] - setForeground d gc fc' - setBackground d gc bc' - io $ wcDrawImageString d p fs gc x y s + withColors d [fc, bc] $ \[fc', bc'] -> do + setForeground d gc fc' + setBackground d gc bc' + io $ wcDrawImageString d p fs gc x y s #ifdef XFT printStringXMF dpy drw fs@(Xft font) gc fc bc x y s = do let screen = defaultScreenOfDisplay dpy hunk ./XMonad/Util/Font.hsc 188 colormap = defaultColormapOfScreen screen visual = defaultVisualOfScreen screen - bcolor <- stringToPixel dpy bc - (a,d) <- textExtentsXMF fs s - gi <- io $ xftTextExtents dpy font s - io $ setForeground dpy gc bcolor - io $ fillRectangle dpy drw gc (x - fi (xglyphinfo_x gi)) - (y - fi a) - (fi $ xglyphinfo_xOff gi) - (fi $ a + d) - io $ withXftDraw dpy drw visual colormap $ - \draw -> withXftColorName dpy visual colormap fc $ - \color -> xftDrawString draw color font x y s + withColors dpy [bc] $ \[bcolor] -> do + (a,d) <- textExtentsXMF fs s + gi <- io $ xftTextExtents dpy font s + io $ setForeground dpy gc bcolor + io $ fillRectangle dpy drw gc (x - fi (xglyphinfo_x gi)) + (y - fi a) + (fi $ xglyphinfo_xOff gi) + (fi $ a + d) + io $ withXftDraw dpy drw visual colormap $ + \draw -> withXftColorName dpy visual colormap fc $ + \color -> xftDrawString draw color font x y s #endif decodeInput :: String -> String hunk ./XMonad/Util/Font.hsc 202 -#if defined XFT || defined UTF8 +#if defined XFT || defined UTF_8 decodeInput = decodeString #else decodeInput = id hunk ./XMonad/Util/Font.hsc 209 #endif encodeOutput :: String -> String -#if defined XFT || defined UTF8 +#if defined XFT || defined UTF_8 encodeOutput = encodeString #else encodeOutput = id hunk ./XMonad/Util/Font.hsc 218 -- | Short-hand for 'fromIntegral' fi :: (Integral a, Num b) => a -> b fi = fromIntegral + +-- | Get the Pixel value for a named color: if an invalid name is +-- given the black pixel will be returned. +stringToPixel :: (Functor m, MonadIO m) => Display -> String -> m Pixel +stringToPixel d s = fromMaybe fallBack <$> io getIt + where getIt = initColor d s + fallBack = blackPixel d (defaultScreen d) + +-- | Get the Pixel value for a named color +initColor :: Display -> String -> IO (Maybe Pixel) +initColor dpy c = C.handle (\_ -> return Nothing) $ Just <$> doIt + where cm = defaultColormap dpy (defaultScreen dpy) + doIt = do + cached_color <- getCachedColor c + c' <- case cached_color of + Just col -> return col + _ -> do (c'', _) <- allocNamedColor dpy cm c + putCachedColor c c'' + return c'' + return $ color_pixel c' + +type ColorCache = [(String, Color)] + +{-# NOINLINE colorCache #-} +colorCache :: IORef ColorCache +colorCache = unsafePerformIO $ newIORef [] + +getCachedColor :: String -> IO (Maybe Color) +getCachedColor color_name = lookup color_name `fmap` readIORef colorCache + +putCachedColor :: String -> Color -> IO () +putCachedColor name c_id = modifyIORef colorCache $ \c -> (name, c_id) : c + +withColors :: MonadIO m => Display -> [String] -> ([Pixel] -> m a) -> m a +withColors d cs f = mapM (io . stringToPixel d) cs >>= f hunk ./XMonad/Util/XUtils.hs 24 , showWindows , hideWindow , hideWindows + , deleteWindow + , deleteWindows , paintWindow , paintAndWrite hunk ./XMonad/Util/XUtils.hs 28 + , withColors , stringToPixel , fi ) where hunk ./XMonad/Util/XUtils.hs 40 import Graphics.X11.Xlib.Extras import Control.Monad.Reader import Data.Bits ( (.|.) ) -import System.Mem.Weak ( addFinalizer ) -- $usage -- See "XMonad.Layout.Tabbed" or "XMonad.Layout.DragPane" for usage hunk ./XMonad/Util/XUtils.hs 62 createNewWindow (Rectangle x y w h) m col o = do d <- asks display rw <- asks theRoot - c <- stringToPixel d col - win <- io $ mkWindow d (defaultScreenOfDisplay d) rw x y w h c o - case m of - Just em -> io $ selectInput d win em - Nothing -> io $ selectInput d win exposureMask - io $ addFinalizer win (destroyWindow d win) - return win + withColors d [col] $ \[c] -> do + win <- io $ mkWindow d (defaultScreenOfDisplay d) rw x y w h c o + case m of + Just em -> io $ selectInput d win em + Nothing -> io $ selectInput d win exposureMask + return win -- | Map a window showWindow :: Window -> X () hunk ./XMonad/Util/XUtils.hs 89 hideWindows :: [Window] -> X () hideWindows = mapM_ hideWindow +-- | destroy a window +deleteWindow :: Window -> X () +deleteWindow w = do + d <- asks display + io $ destroyWindow d w + +-- | the list version +deleteWindows :: [Window] -> X () +deleteWindows = mapM_ deleteWindow + -- | Fill a window with a rectangle and a border paintWindow :: Window -- ^ The window where to draw -> Dimension -- ^ Window width hunk ./XMonad/Util/XUtils.hs 131 -- This stuff is not exported -paintWindow' :: Window -> Rectangle -> Dimension -> String -> String -> Maybe (XMonadFont,String,String,String) -> X () +paintWindow' :: Window -> Rectangle -> Dimension -> String + -> String -> Maybe (XMonadFont,String,String,String) -> X () paintWindow' win (Rectangle x y wh ht) bw color b_color str = do d <- asks display p <- io $ createPixmap d win wh ht (defaultDepthOfScreen $ defaultScreenOfDisplay d) hunk ./XMonad/Util/XUtils.hs 139 gc <- io $ createGC d p -- draw io $ setGraphicsExposures d gc False - [color',b_color'] <- mapM (stringToPixel d) [color,b_color] - -- we start with the border - io $ setForeground d gc b_color' - io $ fillRectangle d p gc 0 0 wh ht - -- and now again - io $ setForeground d gc color' - io $ fillRectangle d p gc (fi bw) (fi bw) ((wh - (bw * 2))) (ht - (bw * 2)) - when (isJust str) $ do - let (xmf,fc,bc,s) = fromJust str - printStringXMF d p xmf gc fc bc x y s - -- copy the pixmap over the window - io $ copyArea d p win gc 0 0 wh ht 0 0 - -- free the pixmap and GC - io $ freePixmap d p - io $ freeGC d gc + withColors d [color,b_color] $ \[color',b_color'] -> do + -- we start with the border + io $ setForeground d gc b_color' + io $ fillRectangle d p gc 0 0 wh ht + -- and now again + io $ setForeground d gc color' + io $ fillRectangle d p gc (fi bw) (fi bw) ((wh - (bw * 2))) (ht - (bw * 2)) + when (isJust str) $ do + let (xmf,fc,bc,s) = fromJust str + printStringXMF d p xmf gc fc bc x y s + -- copy the pixmap over the window + io $ copyArea d p win gc 0 0 wh ht 0 0 + -- free the pixmap and GC + io $ freePixmap d p + io $ freeGC d gc -- | Creates a window with the possibility of setting some attributes. -- Not exported. } Context: [Decoration: fix a nasty space leak Andrea Rossato **20100202123705 Ignore-this: 6ff73f9e21e3e836b90b6408fe1582a185a0af92 ] [add with_utf8 and with_xft configuration flags Andrea Rossato **20100202123308 Ignore-this: 2d7a0a1434670cd0529616aa11201f974aa430bf ] [update waitingUnamp only if we are hiding managed windows Andrea Rossato **20091204231317 Ignore-this: 58cafd57ed8efc1f0b8059be1b0cd25f7fcb5848 ] [swap swapDownS and swapUpS Andrea Rossato **20091129103051 Ignore-this: e76e17deaa0df6b29c6b23a45059deee976f6903 ] [a prettier showStack Andrea Rossato **20091129102932 Ignore-this: 7ff8bd879794273ce701d719021342d80839b616 ] [WorkspaceTools: add MoveWSDown and MoveWSUp Andrea Rossato **20090511185126 Ignore-this: 1dac2185d9aac4b3c919981d6688da7707b7f9fa ] [Lower by moving down and not up Andrea Rossato **20090511184946 Ignore-this: 081b35e8d90d06d17983f09ea7a3c43eb50d50a7 ] [main: respond to ConfigureRequestEvent by configuring the window Andrea Rossato **20090506161516 Ignore-this: 42413d670bef6932701be11d5215848b97bf3257 Needed in the floating layer ] [ManageWindows: add manageWindows' Andrea Rossato **20090504180359 Ignore-this: 7f67baefea19116a86f0bb358c660f348e045510 ] [Add WorkspaceTools and use it in the configuration Andrea Rossato **20090504180132 Ignore-this: c77175948dc691626a7a626402664c2271132ec8 ] [remove logHook and add logHandle as configuration option Andrea Rossato **20090503231539 Ignore-this: 6fc7cbb3197de80af2eccea838b22f12a92b32be ] [update Config to latest additions Andrea Rossato **20090427092935 Ignore-this: 9e815f9d96af105d6b2786442b3d60d6 ] [add Prompt.Rules: a prompt for adding rules to the ManageWindows modifier Andrea Rossato **20090427092920 Ignore-this: 86e000be3c399654be771ab335ac7425 ] [ManageWindows: withManageWindows must return only ignored windows that are present in the stack Andrea Rossato **20090426220424 Ignore-this: 84794c40df745069585994a4ca23265d ] [Tabbed: use withManageWindows to support DoIgnore and DoFloat Andrea Rossato **20090426165541 Ignore-this: 824cfb4314632fe12733c4b28bc17067 ] [add ManageDocks, a layout modifier to automatically manage dock applications Andrea Rossato **20090426165514 Ignore-this: 93b72cc19a4fd6c29e128caef65eb862 ] [add Float: a simple decorated floating layout based on ManageWindows Andrea Rossato **20090426165437 Ignore-this: 230111e786ca7efe15db2a4094e040d0 ] [Decoration: implement a few messages to get ready for the floating layer and fix mouse dragging Andrea Rossato **20090426165332 Ignore-this: 53de2d4e5fb2bb7b3fc223d44aecdd18 ] [add ManageWindows: a layout modifier for managing windows' geometries and other stuff Andrea Rossato **20090426164558 Ignore-this: d24e9f25e46d12b90158f8afff41bb04 - this layout modifier also implements what in xmonad is the manage hooks - here it may be changed at run-time with the AddRule message though; - it also implements a floating layer with a layout modifier to be applied to simple layouts to support the DoFloat and DoIgnore rule actions. ] [Xinerama: let the encapsulated layout handle messages Andrea Rossato **20090426104041 Ignore-this: f1b2ea42fac7f2bc989a1190d8ae5a18 ] [export G.X.Xlib and diff from Decoration Andrea Rossato **20090423132912 Ignore-this: b88e926df0f4471be11e362a24062646 ] [add fromMM to retrieve a stack returned by handleMessage and use it instead Andrea Rossato **20090423130929 Ignore-this: f570c85cb18776ba3dbfec13b6993826 ] [free allocated colors Andrea Rossato **20090412211116 Ignore-this: 565cbdda9aa2b9e916eb497572df6b5f ] [Core: pretty printer for the stack Andrea Rossato **20081213130521 Ignore-this: 39777b4e44eafeef0006bd71cb1a18ba And use it in Config. ] [Stack: map recursively the focused stack too Andrea Rossato **20081213130233 Ignore-this: 1e2bc7364142f98803454639806ab27a This fixes broadcastMessage, that failed on stacks nested in a focused stack. ] [XineramaGrid: remove unneeded pragmas and fix some comments Andrea Rossato **20081213130025 Ignore-this: 2552f5aa24a8983fa2433686299f5a23 ] [Xinerama: fix comments, remove debugging bits and unneeded pragmas Andrea Rossato **20081213125833 Ignore-this: 88aa271c7e931156858786f8893d557e ] [Xinerama: implement description Andrea Rossato **20081213125645 Ignore-this: 9a7f92d7ce89750c5f3c82ed53435379 ] [Xinerama: save the fixed layout even when encapsulated layouts return Nothing Andrea Rossato **20081213102720 Ignore-this: f9712277e3aefa2c9e8256babde48085 ] [Selector: descriptions must use the deepest stack to get layout descriptions Andrea Rossato **20081213102331 Ignore-this: ddd45411e4fb363c7f6c12f41dcd24b2 ] [Selector: remove ListNext which duplicates NextLayoutNoWrap Andrea Rossato **20081213102157 Ignore-this: 9f94d454b3c28c684c749c1bccdd5bf5 ] [Selector: add messages to get the descriptions of combined layouts Andrea Rossato **20081210235138 Ignore-this: b7e9bc489e9b7fe711aa034b7be5fd59 This fixes a bug which causes the layout prompt to display only some available layouts. ] [cabal: compatibility with ghc-6.10 Andrea Rossato **20081210234913 Ignore-this: f9022e82d8d291dded4608881ee47c8d ] [fix bug where prompt mysteriously fails to appear if ~/.xmonad doesn't exist. David Roundy **20081030013244 Ignore-this: a722cf399d6519641ce31d8e2497d3e3 ] [fix buggy reading of layouts!!! David Roundy **20081030005849 Ignore-this: 4669d21e1e5fe87f3915c34c00e946a9 ] [hokey approach to make Xinerama layout self-healing. David Roundy **20081029235744 Ignore-this: f9ee3a1e3ea91c3dfd109d4107811134 I still haven't fixed its readStack. ] [make Operations xinerama-aware. David Roundy **20081029235345 Ignore-this: 4acfef40274557d3b7d88d76edd7085d This fixes issues where sometimes a layout would wrongly assume it was intended to use both screens. ] [make view of all workspaces work with xinerama. David Roundy **20081029221430 Ignore-this: 291d453309d87abcb3e972c70869a948 ] [add Xinerama support... David Roundy **20081029214910 Ignore-this: 8e9f4669adf296b5934efc0a9f300b11 ] [be more careful always to clean up formerly-visible windows. David Roundy **20081029212725 Ignore-this: a2bcdd6fd56721bf6730c9bbcfe3d934 ] [use insertUnfocusS for HandleLittleThings. David Roundy **20081006155422 Ignore-this: 128a7c285679e0309ff9b400e31e505c ] [add XClock layout for handy xclocks. David Roundy **20081006155338 Ignore-this: ca38cf552d9c751f49502c94119fa7ae ] [fix bug where NoBorders left border in tabbed mode. David Roundy **20081006151933 Ignore-this: b1acdc950c453d6ad13250d3f510eb2e ] [add NoBorders. David Roundy **20081001124246 Ignore-this: 2aa0ac750b9d236ec0b15b272d18852e ] [fix readStack of >-> to use readStack of sublayout. David Roundy **20080902101617] [use name of window directly in tab. David Roundy **20080831203807] [Prompt: check the control bit in the modifier mask Andrea Rossato **20080904130858] [remove Hide (now windows hiding is done in Operations.windows) Andrea Rossato **20080901135118] [cut ReleaseResources in favor of garbage collection. David Roundy **20080830154050] [use garbage collector on windows we create. David Roundy **20080830152930] [use garbage collection on fonts. David Roundy **20080830152415] [move focus-follows-mouse into handleDefault as well. David Roundy **20080830145617] [move mouse button handling into handleDefault (and layouts in general). David Roundy **20080830133655] [eliminate unsafe function setFocus. David Roundy **20080830105041] [make WideTiles make the focussed window a bit larger than the others. David Roundy **20080826200923] [allow wide tiles to be 750 pixels wide (for my big laptop). David Roundy **20080826142953] [make WideTiles compile on ghc 6.6 and work as intended on small screens. David Roundy **20080826131715 The idea was that windows would be a minimum of 850 pixels wide, and this was violated. ] [I always want little things handled. David Roundy **20080825175245] [add korgac daemon to hokey list in HandleLittleThings. David Roundy **20080825175137] [add a WideTiles layout David Roundy **20080825164510 This is for when you want to always be able to see a reasonable-width line. ] [update XMonad.Config to use new stuff. David Roundy **20080825161328] [WorkspaceDir: cleanup a bit Andrea Rossato **20080824235701] [fix a bug in the way JumpToLayout is handled by the layout selector Andrea Rossato **20080824233805] [Add WorkspaceDir Andrea Rossato **20080824165324] [Add the prompt library and the Directory, Layout, Shell, Ssh and Theme prompts Andrea Rossato **20080823140225] [add XMonad.Layout.Selector with a layout selector Andrea Rossato **20080823002417] [export setl from Layout.hs and remove the duplicate from LayoutModifier.hs Andrea Rossato **20080822121458] [fix a bug in readStack implementations Andrea Rossato **20080821230046] [add broadcastMessage and use it to broadcast X events Andrea Rossato **20080821130016 broadcastMessage will send a message to every stack and update it without calling Operations.windows ] [make tabbed a default layout. David Roundy **20080819173052] [Decoration: window's mapping is done in Operations.windows Andrea Rossato **20080819120427] [Operation: set the clientMask only for client windows Andrea Rossato **20080819120312] [fix a bug in mapOneS Andrea Rossato **20080817104349 map the first even when dealing with negative indexes ] [add Decoration and Tabbed Andrea Rossato **20080817102832] [export getName Andrea Rossato **20080816105246] [correctly update the stack in ToggleLayouts and export handleDefault Andrea Rossato **20080815223716] [improve placement of little things. David Roundy **20080809045039] [stupid hack to keep systray things out of the way. David Roundy **20080809044117] [make loc count include all the source files. David Roundy **20080808182257] [make WindowNavigation allow moving windows around. David Roundy **20080808181800] [fix centering in WindowNavigation David Roundy **20080808180417] [fix bug in selectS where we altered focus of innocent bystanders. David Roundy **20080808145645] [add WindowNavigation and a few others. David Roundy **20080808053642] [Add LayoutModifier. David Roundy **20080807144215] [Show only one workspace initially... David Roundy **20080807144043] [put a gap between workspaces. David Roundy **20080806155352] [fix mixup of Next with Prev. David Roundy **20080806154428] [add new "Lower" message David Roundy **20080806153405] [add support for multiple workspaces. David Roundy **20080806152258] [remove readsLayout. David Roundy **20080802173824] [use new readStack to read the LayoutStack. David Roundy **20080802172720] [move window insertion into handleDefault via a Message. David Roundy **20080731143817] [make stacks nestable (with keybindings) and make them display and zoom in a David Roundy **20080731134327 nested manner. ] [Add toggleLayouts and full-screen toggle to default config. David Roundy **20080729143559] [fix bugs in reading resume information. David Roundy **20080728050508] [fix simple bug in swapDownS. David Roundy **20080728050452] [don't actually run the test suite, just check that things comile David Roundy **20080728035345] [make handleMessage able to remove last window (and a few other cleanups) David Roundy **20080727144154] [crude hack to create more elegant data structures. David Roundy **20080727142612] [add generation of nested stacks for tests David Roundy **20080704163938] [add tests for truly nested stacks David Roundy **20080701144024 except that I haven't yet added a mechanism for creating these nested stacks... ] [make Stack a tree (but don't yet make use of this property...) David Roundy **20080701143230] [clean up imports in StackProperties. David Roundy **20080629133454] [add nameS field to Stack, so stacks need not be anonymous. David Roundy **20080629132910] [fix bug in focusWindow. David Roundy **20080628152215] [add test for focusUpS. David Roundy **20080628145141] [introduce (with test! deleteFocusS and use it in extractMaster. David Roundy **20080628141850] [fix indentation a bit. David Roundy **20080628134130] [quick hack to avoid infinite (but breakable) loop when using Tabbed. David Roundy **20080516200947 The isMouseFocused hack introduced a race condition where if you click on a tab to select a window, and then move the mouse down before the new window is selected, the focus will alternate between the previously-focused and newly-focused windows in an infinite loop. This loop can be broken by moving the mouse up to the tab area, but it's pretty unpleasant. This race condition is easily triggered on my laptop (and presumably on any older computer running bloated applications like firefox). I've disabled the responsible behavior in a minimal way, since it seems likely that someone may wish to reimplement this behavior, but without the race condition. ] [run stack tests twice as many times David Roundy **20080627225439] [add swapS function to swap two members of a Stack. David Roundy **20080627225337] [add test for differentiate . integrate. David Roundy **20080627220719] [add differentiate2 back into StackSet. David Roundy **20080627220423] [move integrate' out of XMonad.Stack David Roundy **20080627220112] [remove differentiate2 (which is ugly) David Roundy **20080627215827] [add test for sequenceS David Roundy **20080627000406] [move tests out of XMonad.Stack David Roundy **20080626235429 The reasoning is that we want to test the stability and correctness of the interface, so we should restrict tests to only use exported functions. ] [define swapUpS semantics--without using constructor David Roundy **20080626235246] [define focusUp semantics--without using constructor! David Roundy **20080626234621] [test filter semantics in greater detail David Roundy **20080626233807] [test filter and focus together David Roundy **20080626230904] [new tests driver David Roundy **20080626230331] [move Stack tests into XMonad.Stack David Roundy **20080626224418] [move Stack tests into XMonad.Stack David Roundy **20080626222817] [remove abort from Stack. David Roundy **20080626220410] [add test suite (empty) for Stacks. David Roundy **20080626210411] [split Stack functions into separate module. David Roundy **20080626002434] [fix Properties David Roundy **20080625235852] [hide constructor of Stack. David Roundy **20080625231321] [simplify xmonad, removing float support and xinerama support. David Roundy **20080625204544 The beautification comes because StackSet becomes a Stack of Workspaces. This allows more code reuse and a bit more general beautification, with more such beautification to come. ] [Raise windows in the floating layer when moving or resizing Trevor Elliott **20080521215057] [add currentTag convenience function Devin Mullins **20080511224258] [Make Mirror a newtype Spencer Janssen **20080508104640] [Comments Spencer Janssen **20080507013122] [Break long line Spencer Janssen **20080507012608] [Style Spencer Janssen **20080507012519] [Simplify Spencer Janssen **20080507011309] [Overhaul Choose, fixes issue 183 Spencer Janssen **20080506220809] [Remember if focus changes were caused by mouse actions or by key commands Klaus Weidner **20080502175603 If the user used the mouse to change window focus (moving into or clicking on a window), this should be handled differently than focus changes due to keyboard commands. Specifically, it's inappropriate to discard window enter/leave events while the mouse is moving. This fixes the bug where a fast mouse motion across multiple windows resulted in the wrong window keeping focus. It's also helpful information for contrib modules such as UpdatePointer - it's supposed to move the mouse pointer only in response to keyboard actions, not if the user was moving the mouse. ] [Wibble Spencer Janssen **20080506203840] [Added doShift function for more user-friendly hooks Ivan N. Veselov **20080506185757] [use named colours. fixes startup failure on the XO Don Stewart **20080502210149] [Set focus *after* revealing windows Spencer Janssen **20080407222559] [Reveal windows after moving/resizing them. Spencer Janssen **20080407220756 This should reduce the number of repaints for newly visible windows. ] [Hide newly created but non-visible windows (fixes bug #172) Spencer Janssen **20080430014012] [formatting, eta expansion Don Stewart **20080418184337] [XMonad.ManageHook: add 'appName', another name for 'resource' Lukas Mai **20080406012006] [XMonad.ManageHook: make 'title' locale-aware; haddock cleanup Lukas Mai **20080406011338 The code for 'title' was stolen from getname.patch (bug #44). ] [XMonad.Main: call setlocale on startup Lukas Mai **20080406011234] [floats always use current screen (with less bugs) robreim@bobturf.org**20080405135009] [XMonad.Operations: applySizeHint reshuffle Lukas Mai **20080404215615 Make applySizeHints take window borders into account. Move old functionality to applySizeHintsContents. Add new mkAdjust function that generates a custom autohinter for a window. ] [XMonad.Layout: documentation cleanup Lukas Mai **20080404215444] [Remove gaps from the example config Spencer Janssen **20080329232959] [Remove gaps Spencer Janssen **20080325091526] [TAG 0.7 Spencer Janssen **20080329210249] [Remove -fhpc from ghc-options (annoying hackage workaround) Spencer Janssen **20080329205804] [Remove version numbers from README Spencer Janssen **20080329204158] [Bump version to 0.7 Spencer Janssen **20080329191336] [no need to expose --resume to the user Don Stewart **20080328214219] [Rename property to stringProperty Spencer Janssen **20080325201814] [ManageHook: add a 'property' Query that can get an arbitrary String property from a window (such as WM_WINDOW_ROLE, for example) Brent Yorgey **20080325145414] [Main.hs: startupHook should be guarded by userCode Brent Yorgey **20080325171241] [Also print compilation errors to stderr Spencer Janssen **20080324225857] [clean up for style Don Stewart **20080322214116] [add sendMessageWithNoRefresh and have broadcastMessage use it Andrea Rossato **20080223130702 This patch: - moves broadcastMessage and restart from Core to Operations (to avoid circular imports); - in Operations introduces sendMessageWithNoRefresh and move updateLayout outside windows. - broadcastMessage now uses sendMessageWithNoRefresh to obey to this rules: 1. if handleMessage returns Nothing no action is taken; 2. if handleMessage returns a Just ml *only* the layout field of the workspace record will be updated. ] [Broadcast button events to all layouts, fix for issue #111 Spencer Janssen **20071227080356] [--recompile now forces recompilation of xmonad.hs Spencer Janssen **20080324212453] [add --help option Lukas Mai **20080129235258] [add mod-shift-tab to the default bindings, from Mathias Stearn Don Stewart **20080323211421] [more tests Don Stewart **20080323003436] [some tests for the size increment handling in Operations.hs Don Stewart **20080322234952] [more properties for splitting horizontally and vertically Don Stewart **20080322201835] [test message handling of Full layout Don Stewart **20080322192728] [formatting Don Stewart **20080322192635] [strict fields on layout messages Don Stewart **20080322192248] [QuickCheck properties to fully specify the Tall layout, and its messages Don Stewart **20080322041801] [clean up Layout.hs, not entirely happy about the impure layouts. Don Stewart **20080322041718] [comments Don Stewart **20080322041654] [add hpc generation script Don Stewart **20080322041640] [add QuickCheck property for Full: it produces one window, it is fullscreen, and it is the current window Don Stewart **20080322002026] [QC for pureLayout. confirm pureLayout . Tall produces no overlaps Don Stewart **20080322001229] [whitespace Don Stewart **20080322001208] [reenable quickcheck properties for layouts (no overlap, fullscreen) Don Stewart **20080321234015] [formatting Don Stewart **20080321230956] [Revert float location patch. Not Xinerama safe Don Stewart **20080321214129] [XMonad.Core: ignore SIGPIPE, let write calls throw Lukas Mai **20080321171911] [make xmonad recompile if any packages are modified. David Roundy **20080319163738] [update documentation Brent Yorgey **20080311160727] [Reimplement Mirror with runLayout Andrea Rossato **20080225083236] [Reimplement Choose with runLayout Andrea Rossato **20080222193119] [runLayout is now a LayoutClass method and takes the Workspace and the screen Rectangle Andrea Rossato **20080222175815] [add property for ensureTags behaviour on hidden workspaces Don Stewart **20080310182557] [Small linecount fix :) robreim@bobturf.org**20080308021939] [Change floats to always use the current screen robreim@bobturf.org**20080308015829] [use -fhpc by default when testing. All developers should have 6.8.x Don Stewart **20080307184223] [more general properties for view, greedyView Don Stewart **20080307181657] [rework failure cases in StackSet.view Don Stewart **20080307181634] [bit more code coverage Don Stewart **20080307180905] [more tests. slightly better test coverage Don Stewart **20080227180113] [test geometry setting Don Stewart **20080227175554] [incorrect invariant test for greedyView Don Stewart **20080225180350] [Add a startupHook. Brent Yorgey **20080204192445 The only thing I am not sure about here is at what exact point the startupHook should get run. I picked a place that seems to make sense: as late as possible, right before entering the main loop. That way all the layouts/workspaces/other state are set up and the startupHook can manipulate them. ] [Core.hs: add an Applicative instance for X Brent Yorgey **20080204192348] [update LOC claim in man page gwern0@gmail.com**20080215211420] [add quickstart instructions Don Stewart **20080212203502] [Remove non-existent windows on restart Spencer Janssen **20080207091140] [Lift initColor exceptions into Maybe Don Stewart **20080206194858 We should audit all X11 Haskell lib calls we make for whether they throw undocumented exceptions, and then banish that. ] [some things to do Don Stewart **20080206192533] [module uses CPP Don Stewart **20080206190521] [Rename runManageHook to runQuery Spencer Janssen **20080204053336] [let enter dismiss compile errors daniel@wagner-home.com**20080203202852] [Core.hs, StackSet.hs: some documentation updates Brent Yorgey **20080201190653] [Make Mirror implement emptyLayout Andrea Rossato **20080128001834] [xmonad.cabal: add `build-type' to make Cabal happy "Valery V. Vorotyntsev" **20080131163213] [Get version from the Paths_xmonad module generated by Cabal Daniel Neri **20080129144037 No need to bump version in more than one place. ] [Kill stale xmonad 0.1 comments Spencer Janssen **20080128211418] [Point to 0.6 release of contrib Spencer Janssen **20080128101115] [notes on releases Don Stewart **20080128171012] [bump output of --version Don Stewart **20080128170840] [Generalize the type of catchIO, use it in Main.hs Spencer Janssen **20080128054651] [Add emptyLayout to LayoutClass, a method to be called when a workspace is empty Andrea Rossato **20080124013207] [clarify copyright Don Stewart **20080108185640] [TAG 0.6 Spencer Janssen **20080127220633] Patch bundle hash: c8754a89f09b2d4ca2585a0d611d2b8247e3a28c