slideshow: improve viewer inset handling
This commit is contained in:
parent
2e93e0ec14
commit
dc7e8ef379
|
@ -463,12 +463,13 @@
|
|||
|
||||
(define current-sinset zero-inset)
|
||||
(define resizing-frame? #f)
|
||||
(define (reset-display-inset! sinset)
|
||||
(define (reset-display-inset! sinset dc)
|
||||
(unless (and (= (sinset-l current-sinset) (sinset-l sinset))
|
||||
(= (sinset-t current-sinset) (sinset-t sinset))
|
||||
(= (sinset-r current-sinset) (sinset-r sinset))
|
||||
(= (sinset-b current-sinset) (sinset-b sinset)))
|
||||
(set! resizing-frame? #t) ; hack --- see yield below
|
||||
(send dc clear)
|
||||
(send f resize
|
||||
(max 1 (- (inexact->exact (floor config:actual-screen-w))
|
||||
(inexact->exact (floor (* (+ (sinset-l sinset) (sinset-r sinset))
|
||||
|
@ -489,7 +490,7 @@
|
|||
;; sizes, and so that the generated on-size callback
|
||||
;; can be ignored. Obviously, using yield creates a
|
||||
;; kind of race condition for incoming events from the user.
|
||||
(yield)
|
||||
(let loop () (when (yield) (loop)))
|
||||
(set! resizing-frame? #f)))
|
||||
|
||||
|
||||
|
@ -735,7 +736,7 @@
|
|||
|
||||
(define/public (redraw)
|
||||
(unless printing?
|
||||
(reset-display-inset! (sliderec-inset (talk-list-ref current-page)))
|
||||
(reset-display-inset! (sliderec-inset (talk-list-ref current-page)) (get-dc))
|
||||
(send commentary lock #f)
|
||||
(send commentary begin-edit-sequence)
|
||||
(send commentary erase)
|
||||
|
|
Loading…
Reference in New Issue
Block a user