Skip to content

Commit

Permalink
Merge pull request #1355 from sdroege/set-properties-freeze
Browse files Browse the repository at this point in the history
glib: Freeze property notifications while setting multiple properties
  • Loading branch information
sdroege authored Apr 14, 2024
2 parents 8922643 + abed257 commit e56c6fe
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 e56c6fe

Please sign in to comment.