From 7da8a9114eecc750a93087d0ec985641ca2a3165 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 14 Jul 2011 23:47:38 +0200 Subject: Only allocate XEvent once --- lib/Phi/X11.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/Phi/X11.hs b/lib/Phi/X11.hs index e5d220b..56293ef 100644 --- a/lib/Phi/X11.hs +++ b/lib/Phi/X11.hs @@ -136,7 +136,7 @@ receiveEvents :: Phi -> Widget.Display -> IO () receiveEvents phi dispvar = do connection <- Widget.withDisplay dispvar $ return . Fd . connectionNumber - forever $ allocaXEvent $ \xevent -> do + allocaXEvent $ \xevent -> forever $ do handled <- Widget.withDisplay dispvar $ \disp -> do pend <- pending disp if pend /= 0 then -- cgit v1.2.3