aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2008-03-26 16:27:08 +0100
committerDavid Roundy <droundy@darcs.net>2008-03-26 16:27:08 +0100
commit8c3bc1b0af6733ccec390a04c2e5dd416f548fab (patch)
tree8087ec489dcf26696a3b196450236c561bfe7d6d /XMonad/Layout
parent76334065c9298122b174914a73dcd536ac62c0e6 (diff)
downloadXMonadContrib-8c3bc1b0af6733ccec390a04c2e5dd416f548fab.tar.gz
XMonadContrib-8c3bc1b0af6733ccec390a04c2e5dd416f548fab.tar.xz
XMonadContrib-8c3bc1b0af6733ccec390a04c2e5dd416f548fab.zip
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-d34a7d717c984a9bdde64f1f63d334f0cb38b30f.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r--XMonad/Layout/WorkspaceDir.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/XMonad/Layout/WorkspaceDir.hs b/XMonad/Layout/WorkspaceDir.hs
index f550f46..e999c41 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
- redoLayout (WorkspaceDir d) _ s wrs = do w <- gets windowset
- when (Just (focus s) == peek w) $ scd d
- return (wrs, Nothing)
+ modifyLayout (WorkspaceDir d) w r = do tc <- gets (tag . current . windowset)
+ when (tc == tag w) $ scd d
+ runLayout w r
handleMess (WorkspaceDir _) m
| Just (Chdir wd) <- fromMessage m = do wd' <- cleanDir wd
return $ Just $ WorkspaceDir wd'