some cleaning
This commit is contained in:
parent
2869e4b0d4
commit
cb52296c8f
2 changed files with 3 additions and 5 deletions
|
@ -16,7 +16,6 @@ import qualified SDL.Internal.Numbered as SDL (toNumber)
|
||||||
import qualified SDL.Raw as Raw
|
import qualified SDL.Raw as Raw
|
||||||
import qualified GEGL as G
|
import qualified GEGL as G
|
||||||
|
|
||||||
import qualified Data.Text as T
|
|
||||||
import Data.Maybe
|
import Data.Maybe
|
||||||
import Data.IORef
|
import Data.IORef
|
||||||
|
|
||||||
|
@ -134,16 +133,16 @@ getSurfaces window = do
|
||||||
|
|
||||||
preHandleEvents :: [SDL.Event] -> Affection us [SDL.Event]
|
preHandleEvents :: [SDL.Event] -> Affection us [SDL.Event]
|
||||||
preHandleEvents evs =
|
preHandleEvents evs =
|
||||||
catMaybes <$> mapM handle evs
|
mapM handle evs
|
||||||
where
|
where
|
||||||
handle e =
|
handle e =
|
||||||
case SDL.eventPayload e of
|
case SDL.eventPayload e of
|
||||||
SDL.WindowMovedEvent _ -> do
|
SDL.WindowMovedEvent _ -> do
|
||||||
liftIO $ traceIO "I was moved"
|
liftIO $ traceIO "I was moved"
|
||||||
putNewSurface
|
putNewSurface
|
||||||
return Nothing
|
return e
|
||||||
_ ->
|
_ ->
|
||||||
return $ Just e
|
return e
|
||||||
putNewSurface = do
|
putNewSurface = do
|
||||||
ad <- get
|
ad <- get
|
||||||
(oldSurf, surface) <- liftIO $ getSurfaces $ drawWindow ad
|
(oldSurf, surface) <- liftIO $ getSurfaces $ drawWindow ad
|
||||||
|
|
|
@ -85,7 +85,6 @@ data AffectionData us = AffectionData
|
||||||
, drawDimensions :: (Int, Int) -- ^ Dimensions of target surface
|
, drawDimensions :: (Int, Int) -- ^ Dimensions of target surface
|
||||||
, drawStride :: Int -- ^ Stride of target buffer
|
, drawStride :: Int -- ^ Stride of target buffer
|
||||||
, drawCPP :: Int -- ^ Number of components per pixel
|
, drawCPP :: Int -- ^ Number of components per pixel
|
||||||
, clearStack :: [DrawRequest] -- ^ Stack of 'DrawRequest's to be invalidated
|
|
||||||
, elapsedTime :: Double -- ^ Elapsed time in seconds
|
, elapsedTime :: Double -- ^ Elapsed time in seconds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue