improve editor-canvas resizing
A recent bug fix involved moving part of an `editor-canvas%' resize out of atomic mode by queueing a callback (because the resize involves quesrying the editor for its size, etc.), but then the callback happens after a canvas is shown, which can cause it to appear with bogus initial scrollbars. Queue the callback instead as a "refresh" level callback, which gets a chance to run before a frame is made visible.
This commit is contained in:
parent
e71caa5d06
commit
11045a0384
|
@ -30,6 +30,7 @@
|
|||
eventspace-handler-thread
|
||||
eventspace-event-evt
|
||||
queue-callback
|
||||
queue-refresh-event
|
||||
middle-queue-key
|
||||
get-top-level-windows
|
||||
begin-busy-cursor
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
racket/snip/private/prefs
|
||||
racket/snip/private/private
|
||||
(only-in "cycle.rkt" popup-menu%)
|
||||
(only-in "../helper.rkt" queue-window-callback)
|
||||
(only-in "../kernel.rkt" queue-refresh-event)
|
||||
"wx.rkt")
|
||||
|
||||
(provide editor-canvas%)
|
||||
|
@ -292,8 +292,8 @@
|
|||
|
||||
(define/override (on-size)
|
||||
(unless noloop?
|
||||
(queue-window-callback
|
||||
this
|
||||
(queue-refresh-event
|
||||
(get-eventspace)
|
||||
(lambda ()
|
||||
(unless (and media
|
||||
(send media get-printing))
|
||||
|
|
Loading…
Reference in New Issue
Block a user