From 5db48b3e7379e35d84fadb02db0fddd5a3743e90 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 8 Oct 2011 16:49:25 -0500 Subject: [PATCH] avoid calling the show method for tooltips unless the frame is shown. please include in 5.2 --- collects/drracket/private/syncheck/gui.rkt | 8 ++++++-- collects/drracket/private/tooltip.rkt | 16 +++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/collects/drracket/private/syncheck/gui.rkt b/collects/drracket/private/syncheck/gui.rkt index eeb105b19b..eb30b0c0b8 100644 --- a/collects/drracket/private/syncheck/gui.rkt +++ b/collects/drracket/private/syncheck/gui.rkt @@ -1048,13 +1048,17 @@ If the namespace does not, they are colored the unbound color. ;; and on-paint gets called each time the cursor blinks...) (cond [(not eles) - (when tooltip-frame (send tooltip-frame show #f)) + (when tooltip-frame + (when (send tooltip-frame is-shown?) + (send tooltip-frame show #f))) (set! tooltips-in-sync-with-cursor-eles? #t)] [else (define tooltip-infos (filter tooltip-info? eles)) (cond [(null? tooltip-infos) - (when tooltip-frame (send tooltip-frame show #f)) + (when tooltip-frame + (when (send tooltip-frame is-shown?) + (send tooltip-frame show #f))) (set! tooltips-in-sync-with-cursor-eles? #t)] [else (unless tooltip-frame (set! tooltip-frame (new tooltip-frame%))) diff --git a/collects/drracket/private/tooltip.rkt b/collects/drracket/private/tooltip.rkt index 8b2efd4744..2dc05e1d06 100644 --- a/collects/drracket/private/tooltip.rkt +++ b/collects/drracket/private/tooltip.rkt @@ -6,14 +6,16 @@ (define tooltip-frame% (class frame% - (inherit show reflow-container move get-width get-height) + (inherit show reflow-container move get-width get-height is-shown?) + (define/override (on-subwindow-event r evt) - (cond - [(or (send evt entering?) - (send evt button-down?)) - (show #f) - #t] - [else #f])) + (and (is-shown?) + (cond + [(or (send evt entering?) + (send evt button-down?)) + (show #f) + #t] + [else #f]))) (define/public (set-tooltip ls) (send yellow-message set-lab ls))