From abed2575658ff939a70ada889b79fa9246b0e22e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 14 Apr 2024 10:57:28 +0300 Subject: [PATCH] glib: Freeze property notifications while setting multiple properties Fixes https://github.com/gtk-rs/gtk-rs-core/issues/1339 --- glib/src/object.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glib/src/object.rs b/glib/src/object.rs index 7cdeaca56170..ab60a8cf1b4b 100644 --- a/glib/src/object.rs +++ b/glib/src/object.rs @@ -2287,6 +2287,7 @@ impl ObjectExt for T { }) .collect::>(); + let _guard = self.freeze_notify(); for (name, value) in params { unsafe { gobject_ffi::g_object_set_property( @@ -2318,6 +2319,7 @@ impl ObjectExt for T { }) .collect::>(); + let _guard = self.freeze_notify(); for (name, value) in params { unsafe { gobject_ffi::g_object_set_property(