gtk: set-pixbuf-loader-*! must run with glib already locked.
authorMatt Birkholz <matt@birchwood-abbey.net>
Sun, 11 Mar 2018 21:18:19 +0000 (14:18 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Sun, 11 Mar 2018 21:18:19 +0000 (14:18 -0700)
src/gtk/gdk.scm

index 7a3848f7214658b7869f128cd34869f1fea817eb..55cf010342f27fc6e982f53f93a326a2f59b10ca 100644 (file)
@@ -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)))
 \f
 ;;; GdkDisplays