1
0
mirror of https://github.com/xmonad/xmonad.git synced 2025-07-26 09:41:53 -07:00

add tracing for kill window

This commit is contained in:
Don Stewart
2007-03-10 06:21:54 +00:00
parent 38afc2327a
commit b5ab851d2b

@@ -23,6 +23,7 @@ import System.Exit
import Graphics.X11.Xlib import Graphics.X11.Xlib
import Graphics.X11.Xlib.Extras import Graphics.X11.Xlib.Extras
import Numeric
import Control.Monad.State import Control.Monad.State
import WMonad import WMonad
@@ -242,6 +243,7 @@ windows f = do
-- --
manage :: Window -> W () manage :: Window -> W ()
manage w = do manage w = do
trace ("Managing window: 0x" ++ showHex w (", " ++ show w))
withDisplay $ \d -> io $ do withDisplay $ \d -> io $ do
selectInput d w $ structureNotifyMask .|. enterWindowMask .|. propertyChangeMask selectInput d w $ structureNotifyMask .|. enterWindowMask .|. propertyChangeMask
mapWindow d w mapWindow d w
@@ -266,7 +268,9 @@ raise = windows . W.rotate
kill :: W () kill :: W ()
kill = withDisplay $ \d -> do kill = withDisplay $ \d -> do
ws <- gets workspace ws <- gets workspace
whenJust (W.peek ws) $ \w -> io (killClient d w) >> return () whenJust (W.peek ws) $ \w -> do
trace ("Attempting to kill window: 0x" ++ showHex w (", " ++ show w))
io (killClient d w) >> return ()
-- | tag. Move a window to a new workspace -- | tag. Move a window to a new workspace
tag :: Int -> W () tag :: Int -> W ()