--------------------------------------------------------------------------------

sendRestart :: IO ()
sendRestart = do
  dpy <- openDisplay ""
  rw <- rootWindow dpy $ defaultScreen dpy
  xmonad_restart <- internAtom dpy "D12_XMONAD_RESTART" False
  allocaXEvent $ \e -> do
    setEventType e clientMessage
    setClientMessageEvent e rw xmonad_restart 32 0 currentTime
    sendEvent dpy rw False structureNotifyMask e
  sync dpy False

--------------------------------------------------------------------------------
sendRestart :: IO ()
sendRestart = do
  dpy <- openDisplay ""
  rw <- rootWindow dpy $ defaultScreen dpy
  xmonad_restart <- internAtom dpy "D12_XMONAD_RESTART" False
  allocaXEvent $ \e -> do
    setEventType e clientMessage
    setClientMessageEvent e rw xmonad_restart 32 0 currentTime
    sendEvent dpy rw False structureNotifyMask e
  sync dpy False

--------------------------------------------------------------------------------
sendRestart = do
  dpy <- openDisplay ""
  rw <- rootWindow dpy $ defaultScreen dpy
  xmonad_restart <- internAtom dpy "D12_XMONAD_RESTART" False
  allocaXEvent $ \e -> do
    setEventType e clientMessage
    setClientMessageEvent e rw xmonad_restart 32 0 currentTime
    sendEvent dpy rw False structureNotifyMask e
  sync dpy False

--------------------------------------------------------------------------------