@@ -48,6 +48,7 @@ where
49import Graphics.Vty.Config
49import Graphics.Vty.Config
50import Graphics.Vty.Input
50import Graphics.Vty.Input
51+import Graphics.Vty.Input.Events
51import Graphics.Vty.Output
52import Graphics.Vty.Output
52import Graphics.Vty.Output.Interface
53import Graphics.Vty.Output.Interface
53import Graphics.Vty.Picture
54import Graphics.Vty.Picture
@@ -209,16 +210,18 @@ internalMkVty input out = do
209 maybe (return ()) innerUpdate mPic
210 maybe (return ()) innerUpdate mPic
211 let mkResize = uncurry EvResize <$> displayBounds out
212 let mkResize = uncurry EvResize <$> displayBounds out
214+ handleInternalEvent ResumeAfterSignal = mkResize
215+ handleInternalEvent (InputEvent e) = return e
212 gkey = do
217 gkey = do
213− k <- atomically $ readTChan $ _eventChannel input
218+ e <- atomically $ readTChan $ _eventChannel input
214− case k of
219+ handleInternalEvent e
215− (EvResize _ _) -> mkResize
217 gkey' = do
220 gkey' = do
218− k <- atomically $ tryReadTChan $ _eventChannel input
221+ mEv <- atomically $ tryReadTChan $ _eventChannel input
219− case k of
222+ case mEv of
220− (Just (EvResize _ _)) -> Just <$> mkResize
223+ Just e -> Just <$> handleInternalEvent e
221− _ -> return k
224+ Nothing -> return Nothing
223 return $ Vty { update = innerUpdate
226 return $ Vty { update = innerUpdate
224 , nextEvent = gkey
227 , nextEvent = gkey