Skip to content

st/adjustment: Ensure changed signal emission is compressed

Julian Sparber requested to merge jsparber/gnome-shell:emit_changed_once into main

The docs say that st_adjustment_set_values() emits the changed signal only once but it's actually emitted for each changed property, this uses the dispatch_properties_changed vfunc to emit the changed signal only per call to st_adjustment_set_values(). As a positive side effect this also makes it possible to use g_object_freeze/thaw_notify to compress the changed signal emission when using the setters for properties.

This also fixes the wrong emission of the changed signal in st_adjustment_set_values() when only the value property is changed.

Side note: the code is heavily inspired by GtkAdjustment

Merge request reports