hide editor-canvas%'s => blink timer expires
Ensure that a blink timer for a canvas stops running if the canvas becomes hidden. Otherwise, though a race condition, it's possible for a GUI program to never terminate if a "focus-out" event gets lost.
This commit is contained in:
parent
f42356da3f
commit
3f4302e948
|
@ -92,7 +92,9 @@
|
||||||
|
|
||||||
(define/override (notify)
|
(define/override (notify)
|
||||||
(when canvas
|
(when canvas
|
||||||
(send canvas blink-caret)))
|
(if (send canvas is-shown-to-root?)
|
||||||
|
(send canvas blink-caret)
|
||||||
|
(kill))))
|
||||||
|
|
||||||
(define/public (kill)
|
(define/public (kill)
|
||||||
(set! canvas #f)
|
(set! canvas #f)
|
||||||
|
@ -144,7 +146,7 @@
|
||||||
(append
|
(append
|
||||||
(if (or (memq 'no-hscroll style)
|
(if (or (memq 'no-hscroll style)
|
||||||
(memq 'hide-hscroll style))
|
(memq 'hide-hscroll style))
|
||||||
null
|
null
|
||||||
'(hscroll))
|
'(hscroll))
|
||||||
(if (or (memq 'no-vscroll style)
|
(if (or (memq 'no-vscroll style)
|
||||||
(memq 'hide-vscroll style))
|
(memq 'hide-vscroll style))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user