From dc50ed83e2c125c6f47f63207e23c0e45238bec4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 27 May 1999 19:53:04 +0000 Subject: [PATCH] . original commit: 3df145b9885316f2b295f4dd8c18ab55d56a3bf4 --- src/mred/wrap/mred.ss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mred/wrap/mred.ss b/src/mred/wrap/mred.ss index 593aed76..17b7360a 100644 --- a/src/mred/wrap/mred.ss +++ b/src/mred/wrap/mred.ss @@ -16,6 +16,8 @@ ; maximum reasonable minimum width/height (define max-min 10000) +(define o (current-output-port)) + ;;;;;;;;;;;;;;; Security ("thread safety") ;;;;;;;;;;;;;;;;;;;; ;; When the user creates an object or calls a method, or when the @@ -621,17 +623,17 @@ [new-height (get-height)]) (let-values ([(correct-w correct-h) (correct-size new-width new-height)]) (if (or (and (= new-width correct-w) (= new-height correct-h)) - (and (= last-width correct-w) (= last-height correct-h)) - was-bad?) + (and (= last-width correct-w) (= last-height correct-h) + was-bad?)) ;; Good size or we give up; do panel (begin - (set! last-width correct-w) - (set! last-height correct-h) (set! was-bad? #f) (set-panel-size)) ;; Too large/small; try to fix it, but give up after a while (begin (set! was-bad? #t) + (set! last-width correct-w) + (set! last-height correct-h) (set! already-trying? #t) (set-size -1 -1 correct-w correct-h) (set! already-trying? #f)