mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-01 12:41:52 -07:00
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.
This commit is contained in:
@@ -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'
|
||||
|
Reference in New Issue
Block a user