avoid calling the show method for tooltips unless the frame is shown.
please include in 5.2
This commit is contained in:
parent
79dd7df945
commit
5db48b3e73
|
@ -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%)))
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user