diff options
author | Daniel Schoepe <daniel.schoepe@gmail.com> | 2009-11-06 12:50:50 +0100 |
---|---|---|
committer | Daniel Schoepe <daniel.schoepe@gmail.com> | 2009-11-06 12:50:50 +0100 |
commit | 795fed842c57d980e7644bb2df9eb66078ae6d44 (patch) | |
tree | 2a0d6f18800103fd8dd655e89fa3308e4314d5a5 /XMonad/Operations.hs | |
parent | c04a3021b5e95603f7d80732a4bfafb60a4ef261 (diff) | |
download | xmonad-795fed842c57d980e7644bb2df9eb66078ae6d44.tar.gz xmonad-795fed842c57d980e7644bb2df9eb66078ae6d44.tar.xz xmonad-795fed842c57d980e7644bb2df9eb66078ae6d44.zip |
Support for extensible state in contrib modules.
Ignore-this: d04ee1989313ed5710c94f9d7fda3f2a
darcs-hash:20091106115050-7f603-c88ce5e468856afd9e4d458ed3b0a2cfa39e63b3.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Operations.hs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/XMonad/Operations.hs b/XMonad/Operations.hs index fe124f3..f4a6bed 100644 --- a/XMonad/Operations.hs +++ b/XMonad/Operations.hs @@ -68,7 +68,7 @@ manage w = whenX (not <$> isClient w) $ withDisplay $ \d -> do where i = W.tag $ W.workspace $ W.current ws mh <- asks (manageHook . config) - g <- fmap appEndo $ userCodeDef (Endo id) (runQuery mh w) + g <- appEndo <$> userCodeDef (Endo id) (runQuery mh w) windows (g . f) -- | unmanage. A window no longer exists, remove it from the window @@ -413,9 +413,13 @@ restart :: String -> Bool -> X () restart prog resume = do broadcastMessage ReleaseResources io . flush =<< asks display - args <- if resume then gets (("--resume":) . return . showWs . windowset) else return [] + let wsData = show . W.mapLayout show . windowset + maybeShow (t, Right (PersistentExtension ext)) = Just (t, show ext) + maybeShow (t, Left str) = Just (t, str) + maybeShow _ = Nothing + extState = return . show . catMaybes . map maybeShow . M.toList . extensibleState + args <- if resume then gets (\s -> "--resume":wsData s:extState s) else return [] catchIO (executeFile prog True args Nothing) - where showWs = show . W.mapLayout show ------------------------------------------------------------------------ -- | Floating layer support |