improved the check that avoids redrawing (added it to key events and changed it to use equal instead of eq)
svn: r12941
This commit is contained in:
parent
d00db36f66
commit
1b093e7963
|
@ -903,9 +903,11 @@ Matthew
|
|||
(queue-callback
|
||||
(lambda ()
|
||||
(with-handlers ([exn:break? break-handler][exn? exn-handler])
|
||||
(set! the-world (f the-world e))
|
||||
(add-event KEY e)
|
||||
(redraw-callback))))))
|
||||
(let ([new-world (f the-world e)])
|
||||
(unless (equal? new-world the-world)
|
||||
(set! the-world new-world)
|
||||
(add-event KEY e)
|
||||
(redraw-callback))))))))
|
||||
|
||||
;; f : [World Nat Nat MouseEventType -> World]
|
||||
;; esp : EventSpace
|
||||
|
@ -920,7 +922,7 @@ Matthew
|
|||
(when (and (<= 0 x WIDTH) (<= 0 y HEIGHT))
|
||||
(with-handlers ([exn:break? break-handler][exn? exn-handler])
|
||||
(let ([new-world (f the-world x y m)])
|
||||
(unless (eq? new-world the-world)
|
||||
(unless (equal? new-world the-world)
|
||||
(set! the-world new-world)
|
||||
(add-event MOUSE x y m)
|
||||
(redraw-callback)))))))))
|
||||
|
|
Loading…
Reference in New Issue
Block a user