summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/X11/Events.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-09-26 03:52:56 +0100
committerjao <jao@gnu.org>2022-09-26 03:52:56 +0100
commitf946b9c37b39a1b46bfe6433434f951ece531d94 (patch)
treeaaccadcf6efcbc05c6f09c83a640b66b457d0ef6 /src/Xmobar/X11/Events.hs
parent579b787c66124c1bc67dfa7a4ad00f3a8e3611cb (diff)
downloadxmobar-f946b9c37b39a1b46bfe6433434f951ece531d94.tar.gz
xmobar-f946b9c37b39a1b46bfe6433434f951ece531d94.tar.bz2
more little import clean ups
Diffstat (limited to 'src/Xmobar/X11/Events.hs')
-rw-r--r--src/Xmobar/X11/Events.hs19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Xmobar/X11/Events.hs b/src/Xmobar/X11/Events.hs
index 4334f6b..fbd2bd0 100644
--- a/src/Xmobar/X11/Events.hs
+++ b/src/Xmobar/X11/Events.hs
@@ -1,7 +1,7 @@
------------------------------------------------------------------------------
-- |
-- Module: Xmobar.X11.Events
--- Copyright: (c) 2018 Jose Antonio Ortega Ruiz
+-- Copyright: (c) 2018, 2022 Jose Antonio Ortega Ruiz
-- License: BSD3-style (see LICENSE)
--
-- Maintainer: jao@gnu.org
@@ -17,20 +17,19 @@
module Xmobar.X11.Events(nextEvent') where
-import Control.Concurrent
-import System.Posix.Types (Fd(..))
+import qualified Control.Concurrent as C
+import qualified System.Posix.Types as T
-import Graphics.X11.Xlib (
- Display(..), XEventPtr, nextEvent, pending, connectionNumber)
+import qualified Graphics.X11.Xlib as X
-- | A version of nextEvent that does not block in foreign calls.
-nextEvent' :: Display -> XEventPtr -> IO ()
+nextEvent' :: X.Display -> X.XEventPtr -> IO ()
nextEvent' d p = do
- pend <- pending d
+ pend <- X.pending d
if pend /= 0
- then nextEvent d p
+ then X.nextEvent d p
else do
- threadWaitRead (Fd fd)
+ C.threadWaitRead (T.Fd fd)
nextEvent' d p
where
- fd = connectionNumber d
+ fd = X.connectionNumber d