diff options
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 |