@@ -129,38 +129,25 @@ intMkVty input out = do
129129 lastUpdateRef <- newIORef Nothing
130130
131131 let innerUpdate inPic = do
132− b@(w,h) <- displayBounds out
132+ b <- displayBounds out
133133 let cursor = picCursor inPic
134− inPic' = case cursor of
135− Cursor x y ->
136− let
137− x' = case x of
138− _ | x < 0 -> 0
139− | x >= w -> w - 1
140− | otherwise -> x
141− y' = case y of
142− _ | y < 0 -> 0
143− | y >= h -> h - 1
144− | otherwise -> y
145− in inPic { picCursor = Cursor x' y' }
146− _ -> inPic
147134 mlastUpdate <- readIORef lastUpdateRef
148135 updateData <- case mlastUpdate of
149136 Nothing -> do
150137 dc <- displayContext out b
151− outputPicture dc inPic'
138+ outputPicture dc inPic
152139 return (b, dc)
153140 Just (lastBounds, lastContext) -> do
154141 if b /= lastBounds
155142 then do
156143 dc <- displayContext out b
157− outputPicture dc inPic'
144+ outputPicture dc inPic
158145 return (b, dc)
159146 else do
160− outputPicture lastContext inPic'
147+ outputPicture lastContext inPic
161148 return (b, lastContext)
162149 writeIORef lastUpdateRef $ Just updateData
163− writeIORef lastPicRef $ Just inPic'
150+ writeIORef lastPicRef $ Just inPic
164151
165152 let innerRefresh = do
166153 writeIORef lastUpdateRef Nothing