Skip to content

Commit

Permalink
glib: Freeze property notifications while setting multiple properties
Browse files Browse the repository at this point in the history
Fixes #1339
  • Loading branch information
sdroege committed Apr 14, 2024
1 parent 8922643 commit abed257
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions glib/src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2287,6 +2287,7 @@ impl<T: ObjectType> ObjectExt for T {
})
.collect::<smallvec::SmallVec<[_; 10]>>();

let _guard = self.freeze_notify();
for (name, value) in params {
unsafe {
gobject_ffi::g_object_set_property(
Expand Down Expand Up @@ -2318,6 +2319,7 @@ impl<T: ObjectType> ObjectExt for T {
})
.collect::<smallvec::SmallVec<[_; 10]>>();

let _guard = self.freeze_notify();
for (name, value) in params {
unsafe {
gobject_ffi::g_object_set_property(
Expand Down

0 comments on commit abed257

Please sign in to comment.