generalized signature of updateLayoutsBy

This commit is contained in:
Keith
2021-08-10 15:36:55 -04:00
committed by Tomas Janousek
parent 5eff329fc6
commit eb48bb4aef

View File

@@ -456,7 +456,8 @@ filterMessageWithNoRefresh p a = updateLayoutsBy $ \ wrk ->
else pure Nothing
-- | Update the layouts of some workspaces.
updateLayoutsBy :: (WindowSpace -> X (Maybe (Layout Window))) -> X ()
updateLayoutsBy :: MonadState XState m
=> (WindowSpace -> m (Maybe (Layout Window))) -> m ()
updateLayoutsBy f = runOnWorkspaces' $ \ wrk ->
maybe wrk (\ l' -> wrk{ W.layout = l' }) <$> f wrk