From cb52296c8f02255ac71178288d222db64dafefb2 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 20 Feb 2017 20:22:01 +0100 Subject: [PATCH] some cleaning --- src/Affection.hs | 7 +++---- src/Affection/Types.hs | 1 - 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Affection.hs b/src/Affection.hs index ce35237..95407df 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -16,7 +16,6 @@ import qualified SDL.Internal.Numbered as SDL (toNumber) import qualified SDL.Raw as Raw import qualified GEGL as G -import qualified Data.Text as T import Data.Maybe import Data.IORef @@ -134,16 +133,16 @@ getSurfaces window = do preHandleEvents :: [SDL.Event] -> Affection us [SDL.Event] preHandleEvents evs = - catMaybes <$> mapM handle evs + mapM handle evs where handle e = case SDL.eventPayload e of SDL.WindowMovedEvent _ -> do liftIO $ traceIO "I was moved" putNewSurface - return Nothing + return e _ -> - return $ Just e + return e putNewSurface = do ad <- get (oldSurf, surface) <- liftIO $ getSurfaces $ drawWindow ad diff --git a/src/Affection/Types.hs b/src/Affection/Types.hs index fc6ff6b..7ac003d 100644 --- a/src/Affection/Types.hs +++ b/src/Affection/Types.hs @@ -85,7 +85,6 @@ data AffectionData us = AffectionData , drawDimensions :: (Int, Int) -- ^ Dimensions of target surface , drawStride :: Int -- ^ Stride of target buffer , drawCPP :: Int -- ^ Number of components per pixel - , clearStack :: [DrawRequest] -- ^ Stack of 'DrawRequest's to be invalidated , elapsedTime :: Double -- ^ Elapsed time in seconds }