From 2a6357340744ddc8560b4d9322c21829d66f8910 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 11 Mar 2018 14:18:19 -0700 Subject: [PATCH] gtk: set-pixbuf-loader-*! must run with glib already locked. --- src/gtk/gdk.scm | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/gtk/gdk.scm b/src/gtk/gdk.scm index 7a3848f72..55cf01034 100644 --- a/src/gtk/gdk.scm +++ b/src/gtk/gdk.scm @@ -217,25 +217,22 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. loader (open-binary-input-file (->namestring (->truename filename))))) (define (set-pixbuf-loader-size-hook! loader receiver) - (with-glib-lock ; serialize with loader thread - (lambda () - (%set-pixbuf-loader-size-hook! loader receiver) - (let ((size (pixbuf-loader-size loader))) - (if size (receiver (car size) (cdr size))))))) + (assert-glib-locked 'set-pixbuf-loader-size-hook!) ; serialize with loader + (%set-pixbuf-loader-size-hook! loader receiver) + (let ((size (pixbuf-loader-size loader))) + (if size (receiver (car size) (cdr size))))) (define (set-pixbuf-loader-pixbuf-hook! loader receiver) - (with-glib-lock ; serialize with loader thread - (lambda () - (%set-pixbuf-loader-pixbuf-hook! loader receiver) - (let ((pixbuf (pixbuf-loader-pixbuf loader))) - (if pixbuf (receiver pixbuf)))))) + (assert-glib-locked 'set-pixbuf-loader-pixbuf-hook!) ; serialize with loader + (%set-pixbuf-loader-pixbuf-hook! loader receiver) + (let ((pixbuf (pixbuf-loader-pixbuf loader))) + (if pixbuf (receiver pixbuf)))) (define (set-pixbuf-loader-close-hook! loader thunk) - (with-glib-lock ; serialize with loader thread - (lambda () - (%set-pixbuf-loader-close-hook! loader thunk) - (if (pixbuf-loader-closed? loader) - (thunk))))) + (assert-glib-locked 'set-pixbuf-loader-close-hook!) ; serialize with loader + (%set-pixbuf-loader-close-hook! loader thunk) + (if (pixbuf-loader-closed? loader) + (thunk))) ;;; GdkDisplays -- 2.25.1