summaryrefslogtreecommitdiffhomepage
path: root/src/lib/Xmobar/XUtil.hs
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2018-11-25 01:40:25 +0000
committerjao <jao@gnu.org>2018-11-25 01:40:25 +0000
commit071794d33443ff76d85be035394103fc8bf48e98 (patch)
treeaf709ba185ca14eefaf1dca66e678f529990ef38 /src/lib/Xmobar/XUtil.hs
parent0b7b43ef83a2ab6fd894c20e028b9d69372c7266 (diff)
downloadxmobar-071794d33443ff76d85be035394103fc8bf48e98.tar.gz
xmobar-071794d33443ff76d85be035394103fc8bf48e98.tar.bz2
Wee refactoring
Diffstat (limited to 'src/lib/Xmobar/XUtil.hs')
-rw-r--r--src/lib/Xmobar/XUtil.hs15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/lib/Xmobar/XUtil.hs b/src/lib/Xmobar/XUtil.hs
index c4b4531..e70612b 100644
--- a/src/lib/Xmobar/XUtil.hs
+++ b/src/lib/Xmobar/XUtil.hs
@@ -21,10 +21,8 @@ module Xmobar.XUtil
, textExtents
, textWidth
, printString
- , nextEvent'
) where
-import Control.Concurrent
import Control.Monad (when)
import Control.Monad.Trans
import Control.Exception (SomeException, handle)
@@ -34,7 +32,6 @@ import Graphics.X11.Xlib hiding (textExtents, textWidth)
import qualified Graphics.X11.Xlib as Xlib (textExtents, textWidth)
import Graphics.X11.Xlib.Extras
import System.Mem.Weak ( addFinalizer )
-import System.Posix.Types (Fd(..))
#if defined XFT
import Xmobar.MinXft
@@ -161,15 +158,3 @@ printString dpy drw fs@(Xft fonts) _ fc bc x y s al =
drawXftRect draw bc' x (y - a) (1 + xglyphinfo_xOff gi) (a + d + 2)
drawXftString' draw fc' fonts (toInteger x) (toInteger y) s
#endif
-
--- | A version of nextEvent that does not block in foreign calls.
-nextEvent' :: Display -> XEventPtr -> IO ()
-nextEvent' d p = do
- pend <- pending d
- if pend /= 0
- then nextEvent d p
- else do
- threadWaitRead (Fd fd)
- nextEvent' d p
- where
- fd = connectionNumber d