fix editor-canvas%' internal
on-size' handling
The `on-size' method is called in atomic mode, and we can't call into the editor's sizing functions in atomic mode. Watch out for refresh and/or window-sizing problems.
This commit is contained in:
parent
b61f3f751c
commit
dba3c14746
|
@ -292,16 +292,19 @@
|
|||
|
||||
(define/override (on-size)
|
||||
(unless noloop?
|
||||
(unless (and media
|
||||
(send media get-printing))
|
||||
(begin-refresh-sequence)
|
||||
(let-boxes ([w 0]
|
||||
[h 0])
|
||||
(get-size w h)
|
||||
(unless (and (= w lastwidth)
|
||||
(= h lastheight))
|
||||
(reset-size)))
|
||||
(end-refresh-sequence))))
|
||||
(queue-window-callback
|
||||
this
|
||||
(lambda ()
|
||||
(unless (and media
|
||||
(send media get-printing))
|
||||
(begin-refresh-sequence)
|
||||
(let-boxes ([w 0]
|
||||
[h 0])
|
||||
(get-size w h)
|
||||
(unless (and (= w lastwidth)
|
||||
(= h lastheight))
|
||||
(reset-size)))
|
||||
(end-refresh-sequence))))))
|
||||
|
||||
(define/private (reset-size)
|
||||
(reset-visual #f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user