some cleaning

This commit is contained in:
nek0 2017-02-20 20:22:01 +01:00
parent 2869e4b0d4
commit cb52296c8f
2 changed files with 3 additions and 5 deletions

View File

@ -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

View File

@ -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
}