From 4d2170bbb4dcac1ef18c7653853fe502fc13a5ea Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Mon, 17 Sep 2007 21:41:13 +0000 Subject: [PATCH] Operations.sink is gone --- Commands.hs | 4 ++-- SinkAll.hs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Commands.hs b/Commands.hs index 524eadce..4916807c 100644 --- a/Commands.hs +++ b/Commands.hs @@ -27,7 +27,7 @@ module XMonadContrib.Commands ( import XMonad import Operations -import StackSet hiding (sink) +import StackSet import XMonadContrib.Dmenu (dmenu) import {-# SOURCE #-} Config (workspaces) @@ -91,7 +91,7 @@ defaultCommands = workspaceCommands ++ screenCommands , ("swap-up", windows $ swapUp) , ("swap-down", windows $ swapDown) , ("swap-master", windows $ swapMaster) - , ("sink", withFocused sink) + , ("sink", withFocused $ windows . sink) , ("quit-wm", io $ exitWith ExitSuccess) ] diff --git a/SinkAll.hs b/SinkAll.hs index b6caa1db..5531e2df 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