avoid `on-size' problems

Merge to 5.1

original commit: e2c43bf3ecc969112693e926bbbb7cf846fea4eb
This commit is contained in:
Matthew Flatt 2011-01-30 15:39:40 -06:00
parent e96d9460fd
commit 4cd3e192f4

View File

@ -206,8 +206,8 @@
(set! old-h h) (set! old-h h)
(as-exit (lambda () (send mred on-size w h))))) (as-exit (lambda () (send mred on-size w h)))))
(let* ([p (area-parent)] (let* ([p (area-parent)]
[x (- (get-x) (or (and p (send p dx)) 0))] [x (max -10000 (min 10000 (- (get-x) (or (and p (send p dx)) 0))))]
[y (- (get-y) (or (and p (send p dy)) 0))]) [y (max -10000 (min 10000 (- (get-y) (or (and p (send p dy)) 0))))])
(when (not (and (= x old-x) (= y old-y))) (when (not (and (= x old-x) (= y old-y)))
(set! old-x x) (set! old-x x)
(set! old-y y) (set! old-y y)