From 4cd3e192f4e5e9f6af808f6452df4a792350df7b Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sun, 30 Jan 2011 15:39:40 -0600 Subject: [PATCH] avoid `on-size' problems Merge to 5.1 original commit: e2c43bf3ecc969112693e926bbbb7cf846fea4eb --- collects/mred/private/wxwindow.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wxwindow.rkt b/collects/mred/private/wxwindow.rkt index dc18af23..7d82d273 100644 --- a/collects/mred/private/wxwindow.rkt +++ b/collects/mred/private/wxwindow.rkt @@ -206,8 +206,8 @@ (set! old-h h) (as-exit (lambda () (send mred on-size w h))))) (let* ([p (area-parent)] - [x (- (get-x) (or (and p (send p dx)) 0))] - [y (- (get-y) (or (and p (send p dy)) 0))]) + [x (max -10000 (min 10000 (- (get-x) (or (and p (send p dx)) 0))))] + [y (max -10000 (min 10000 (- (get-y) (or (and p (send p dy)) 0))))]) (when (not (and (= x old-x) (= y old-y))) (set! old-x x) (set! old-y y)