diff options
author | David Roundy <droundy@darcs.net> | 2008-03-26 16:27:08 +0100 |
---|---|---|
committer | David Roundy <droundy@darcs.net> | 2008-03-26 16:27:08 +0100 |
commit | 1d81bb032c0e03e156fbf9c583ed76f9daba6d18 (patch) | |
tree | dac46f0788c74786b6db7153b81094ccaaa1508b | |
parent | 81ecf4d31f81f08d9705005d22a68ec204bca799 (diff) | |
download | XMonadContrib-1d81bb032c0e03e156fbf9c583ed76f9daba6d18.tar.gz XMonadContrib-1d81bb032c0e03e156fbf9c583ed76f9daba6d18.tar.xz XMonadContrib-1d81bb032c0e03e156fbf9c583ed76f9daba6d18.zip |
UNDO: make workspaceDir work even in workspaces with no windows.
This also fixes a (minor) bug when the focussed window is present on
multiple visible workspaces.
darcs-hash:20080326152708-72aca-5cb04df4f522b8252ec0980945b4e77381a4bf70.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Layout/WorkspaceDir.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Layout/WorkspaceDir.hs b/XMonad/Layout/WorkspaceDir.hs index e999c41..f550f46 100644 --- a/XMonad/Layout/WorkspaceDir.hs +++ b/XMonad/Layout/WorkspaceDir.hs @@ -69,9 +69,9 @@ instance Message Chdir data WorkspaceDir a = WorkspaceDir String deriving ( Read, Show ) instance LayoutModifier WorkspaceDir Window where - modifyLayout (WorkspaceDir d) w r = do tc <- gets (tag . current . windowset) - when (tc == tag w) $ scd d - runLayout w r + redoLayout (WorkspaceDir d) _ s wrs = do w <- gets windowset + when (Just (focus s) == peek w) $ scd d + return (wrs, Nothing) handleMess (WorkspaceDir _) m | Just (Chdir wd) <- fromMessage m = do wd' <- cleanDir wd return $ Just $ WorkspaceDir wd' |