@@ -92,23 +92,34 @@ intMkVty kvar fend t = do
93 let inner_update in_pic = do
93 let inner_update in_pic = do
94 b <- display_bounds t
94 b <- display_bounds t
95+ let DisplayRegion w h = b
96+ Cursor x y = pic_cursor in_pic
98+ _ | x >= 0x80000000 -> 0
102+ _ | y >= 0x80000000 -> 0
105+ in_pic' = in_pic { pic_cursor = Cursor x' y' }
95 mlast_update <- readIORef last_update_ref
106 mlast_update <- readIORef last_update_ref
96 update_data <- case mlast_update of
107 update_data <- case mlast_update of
97 Nothing -> do
108 Nothing -> do
98 d <- display_context t b
109 d <- display_context t b
99− output_picture d in_pic
110+ output_picture d in_pic'
100 return (b, d)
111 return (b, d)
101 Just (last_bounds, last_context) -> do
112 Just (last_bounds, last_context) -> do
102 if b /= last_bounds
113 if b /= last_bounds
104 d <- display_context t b
115 d <- display_context t b
105− output_picture d in_pic
116+ output_picture d in_pic'
106 return (b, d)
117 return (b, d)
108− output_picture last_context in_pic
119+ output_picture last_context in_pic'
109 return (b, last_context)
120 return (b, last_context)
110 writeIORef last_update_ref $ Just update_data
121 writeIORef last_update_ref $ Just update_data
111− writeIORef last_pic_ref $ Just in_pic
122+ writeIORef last_pic_ref $ Just in_pic'
113 let inner_refresh
124 let inner_refresh
114 = writeIORef last_update_ref Nothing
125 = writeIORef last_update_ref Nothing