Skip to content

Commit

Permalink
handle atom 0
Browse files Browse the repository at this point in the history
  • Loading branch information
geekosaur committed May 31, 2024
1 parent c21f9e6 commit eb0d75e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions XMonad/Hooks/DebugEvents.hs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ import XMonad.Prelude hiding (fi, bool)
import XMonad.Hooks.DebugKeyEvents (debugKeyEvents)
import XMonad.Util.DebugWindow (debugWindow)

-- import Graphics.X11.Xlib.Extras.GetAtomName (getAtomName)

import Control.Exception as E
import Control.Monad.Fail
import Control.Monad.State
Expand Down Expand Up @@ -192,6 +190,7 @@ debugEventsHook' _ = return ()

-- | Emit information about an atom.
atomName :: Atom -> X String
atomName 0 = return "-none-"
atomName a = withDisplay $ \d ->
io $ fromMaybe ("(unknown atom " ++ show a ++ ")") <$> getAtomName d a

Expand Down

0 comments on commit eb0d75e

Please sign in to comment.