From: Matt Birkholz Date: Sun, 11 Mar 2018 22:59:57 +0000 (-0700) Subject: gtk (surface-ink-flush): Use with-glib-lock. X-Git-Tag: mit-scheme-pucked-x11-0.2.2~52 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f635b57b8ddc03776b5ead37af7bd0aacbe1e447;p=mit-scheme.git gtk (surface-ink-flush): Use with-glib-lock. Signal-thread-event is too asynchronous, catching glib-thread without its glib-mutex lock. --- diff --git a/src/gtk/fix-layout.scm b/src/gtk/fix-layout.scm index d371f304c..c74ab3b42 100644 --- a/src/gtk/fix-layout.scm +++ b/src/gtk/fix-layout.scm @@ -1794,19 +1794,18 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. surface))))) (define (surface-ink-flush ink) - (let ((surface (surface-ink-surface ink)) - (exposed (surface-ink-exposed ink))) + (let ((surface (surface-ink-surface ink))) (cairo-surface-flush surface) - (if exposed - (signal-thread-event glib-thread - (lambda () - (%trace2 ";surface-ink-flush copying\n") - (let ((cr (cairo-create exposed))) - (cairo-set-source-surface cr surface 0 0) - (cairo-paint cr) - (cairo-destroy cr)) - (cairo-surface-flush exposed)))) - (drawing-damage ink))) + (with-glib-lock + (lambda () + (let ((exposed (surface-ink-exposed ink))) + (if exposed + (let ((cr (cairo-create exposed))) + (cairo-set-source-surface cr surface 0 0) + (cairo-paint cr) + (cairo-destroy cr) + (cairo-surface-flush exposed))) + (drawing-damage ink)))))) (define (set-surface-ink-position! ink x y) (set-fix-rect-position! (fix-ink-extent ink) x y))