mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
text: Prevent a relayout if font descriptions or attrs are equal
https://bugzilla.gnome.org/show_bug.cgi?id=689399
This commit is contained in:
parent
c5321da66c
commit
80eeac71f9
@ -571,7 +571,8 @@ clutter_text_set_font_description_internal (ClutterText *self,
|
||||
{
|
||||
ClutterTextPrivate *priv = self->priv;
|
||||
|
||||
if (priv->font_desc == desc)
|
||||
if (priv->font_desc == desc ||
|
||||
pango_font_description_equal (priv->font_desc, desc))
|
||||
return;
|
||||
|
||||
if (priv->font_desc != NULL)
|
||||
@ -5423,6 +5424,12 @@ clutter_text_set_attributes (ClutterText *self,
|
||||
|
||||
priv = self->priv;
|
||||
|
||||
/* While we should probably test for equality, Pango doesn't
|
||||
* provide us an easy method to check for AttrList equality.
|
||||
*/
|
||||
if (priv->attrs == attrs)
|
||||
return;
|
||||
|
||||
if (attrs)
|
||||
pango_attr_list_ref (attrs);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user