st: Only notify on property changes
Since commit 5a23c96bd9
we use EXPLICIT_NOTIFY for properties,
however there are still cases where we still notify unconditionally
from the setter, because we don't check the existing value first.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2325>
This commit is contained in:

committed by
Marge Bot

parent
8713f9d878
commit
a06b469fbb
@ -2434,6 +2434,9 @@ st_widget_set_accessible_name (StWidget *widget,
|
||||
|
||||
priv = st_widget_get_instance_private (widget);
|
||||
|
||||
if (g_strcmp0 (name, priv->accessible_name) == 0)
|
||||
return;
|
||||
|
||||
if (priv->accessible_name != NULL)
|
||||
g_free (priv->accessible_name);
|
||||
|
||||
@ -2490,6 +2493,10 @@ st_widget_set_accessible_role (StWidget *widget,
|
||||
g_return_if_fail (ST_IS_WIDGET (widget));
|
||||
|
||||
priv = st_widget_get_instance_private (widget);
|
||||
|
||||
if (priv->accessible_role == role)
|
||||
return;
|
||||
|
||||
priv->accessible_role = role;
|
||||
|
||||
g_object_notify_by_pspec (G_OBJECT (widget), props[PROP_ACCESSIBLE_ROLE]);
|
||||
|
Reference in New Issue
Block a user