mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-07 23: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 )
|
data WorkspaceDir a = WorkspaceDir String deriving ( Read, Show )
|
||||||
|
|
||||||
instance LayoutModifier WorkspaceDir Window where
|
instance LayoutModifier WorkspaceDir Window where
|
||||||
modifyLayout (WorkspaceDir d) w r = do tc <- gets (tag . current . windowset)
|
redoLayout (WorkspaceDir d) _ s wrs = do w <- gets windowset
|
||||||
when (tc == tag w) $ scd d
|
when (Just (focus s) == peek w) $ scd d
|
||||||
runLayout w r
|
return (wrs, Nothing)
|
||||||
handleMess (WorkspaceDir _) m
|
handleMess (WorkspaceDir _) m
|
||||||
| Just (Chdir wd) <- fromMessage m = do wd' <- cleanDir wd
|
| Just (Chdir wd) <- fromMessage m = do wd' <- cleanDir wd
|
||||||
return $ Just $ WorkspaceDir wd'
|
return $ Just $ WorkspaceDir wd'
|
||||||
|
Reference in New Issue
Block a user