(define (remove-line line)
(mark-temporary! (line-ink-start line))
(mark-temporary! (line-ink-end line))
- (fix-ink-remove! line)
- (clear-cached-pango-layout line))
+ (without-interrupts
+ (lambda ()
+ (clear-cached-pango-layout line)
+ (fix-ink-remove! line))))
(define (no-display-changes?)
;; If the drawing already agrees with the buffer and its current
;; Do not (call-next-method ink). There is no <text-ink> method.
(if (unchanged? ink)
(or (line-ink-cached-pango-layout ink)
- (let ((layout (or (salvage-pango-layout ink)
- (cache-pango-layout ink))))
- (layout-line! ink layout)
- layout))
+ ;; When executed by the expose handler, this already runs
+ ;; without-interrupts. However there are other places
+ ;; (e.g. redraw-cursor) where this could be called. Ensure
+ ;; that the async. expose handlers do not start frobbing the
+ ;; pango-layout cache until we are done here.
+ (without-interrupts
+ (lambda ()
+ (let ((layout (or (salvage-pango-layout ink)
+ (cache-pango-layout ink))))
+ (layout-line! ink layout)
+ layout))))
(begin
(outf-error ";text-ink-pango-layout: punted "ink"\n")
#f)))
(define (clear-cached-pango-layout line)
+ ;; This probably aught to be done without-interrupts, since it
+ ;; frobs a cache used (filled!) by the async expose handler.
(let ((layout (line-ink-cached-pango-layout line)))
(if layout
(let* ((drawing (fix-ink-drawing line))