aboutsummaryrefslogtreecommitdiffstats
path: root/SinkAll.hs
diff options
context:
space:
mode:
Diffstat (limited to 'SinkAll.hs')
-rw-r--r--SinkAll.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/SinkAll.hs b/SinkAll.hs
index b6caa1d..5531e2d 100644
--- a/SinkAll.hs
+++ b/SinkAll.hs
@@ -16,7 +16,7 @@ module XMonadContrib.SinkAll (
import Operations
import XMonad
-import StackSet hiding (sink)
+import StackSet
import Control.Monad.State
import Graphics.X11.Xlib
@@ -32,6 +32,6 @@ sinkAll :: X ()
sinkAll = withAll sink
-- Apply a function to all windows on current workspace.
-withAll :: (Window -> X a) -> X ()
-withAll f = gets (integrate' . stack . workspace . current . windowset) >>=
- mapM_ f
+withAll :: (Window -> WindowSet -> WindowSet) -> X ()
+withAll f = windows $ \ws -> let all = integrate' . stack . workspace . current $ ws
+ in foldr f ws all