diff options
author | Spencer Janssen <spencerjanssen@gmail.com> | 2009-02-13 02:30:11 +0100 |
---|---|---|
committer | Spencer Janssen <spencerjanssen@gmail.com> | 2009-02-13 02:30:11 +0100 |
commit | 736d0749b19d594422083c6622c0f98a76660498 (patch) | |
tree | ec27141f02b98556b0499c8f66411ea86a3e9cfd /XMonad/Actions | |
parent | a0854ba8df2b837ede780a2db57a0337deaad73f (diff) | |
download | XMonadContrib-736d0749b19d594422083c6622c0f98a76660498.tar.gz XMonadContrib-736d0749b19d594422083c6622c0f98a76660498.tar.xz XMonadContrib-736d0749b19d594422083c6622c0f98a76660498.zip |
SpawnOn: delete seen pids
Ignore-this: 8b15a60bba1edf1bab5fb77ac54eb12f
darcs-hash:20090213013011-25a6b-279244c622ea2066d94725e40434b81c4cdec1c0.gz
Diffstat (limited to 'XMonad/Actions')
-rw-r--r-- | XMonad/Actions/SpawnOn.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/XMonad/Actions/SpawnOn.hs b/XMonad/Actions/SpawnOn.hs index ec1d57d..db7eb53 100644 --- a/XMonad/Actions/SpawnOn.hs +++ b/XMonad/Actions/SpawnOn.hs @@ -74,8 +74,11 @@ manageSpawn sp = do pids <- io . readIORef $ pidsRef sp mp <- pid case flip lookup pids =<< mp of - Just w -> doF (W.shift w) Nothing -> doF id + Just w -> do + whenJust mp $ \p -> + io . modifyIORef (pidsRef sp) $ filter ((/= p) . fst) + doF (W.shift w) mkPrompt :: (String -> X ()) -> XPConfig -> X () mkPrompt cb c = do |