css: Fix shadow value equal

This function was not doing the right thing.

Once we are doing the right thing and not compare
shadows as unequal, some reftests that inhibit
snapshots for a few frames now hang forever, since
we are no more redrawing unnecessarily. Fix that
with an explicit queue_draw.
This commit is contained in:
Matthias Clasen 2021-02-03 11:21:23 -05:00
parent 38481680e1
commit a14a0c6315
2 changed files with 6 additions and 5 deletions

View File

@ -151,11 +151,11 @@ gtk_css_value_shadow_equal (const GtkCssValue *value1,
const ShadowValue *shadow2 = &value2->shadows[i];
if (shadow1->inset != shadow2->inset ||
_gtk_css_value_equal (shadow1->hoffset, shadow2->hoffset) ||
_gtk_css_value_equal (shadow1->voffset, shadow2->voffset) ||
_gtk_css_value_equal (shadow1->radius, shadow2->radius) ||
_gtk_css_value_equal (shadow1->spread, shadow2->spread) ||
_gtk_css_value_equal (shadow1->color, shadow2->color))
!_gtk_css_value_equal (shadow1->hoffset, shadow2->hoffset) ||
!_gtk_css_value_equal (shadow1->voffset, shadow2->voffset) ||
!_gtk_css_value_equal (shadow1->radius, shadow2->radius) ||
!_gtk_css_value_equal (shadow1->spread, shadow2->spread) ||
!_gtk_css_value_equal (shadow1->color, shadow2->color))
return FALSE;
}

View File

@ -30,6 +30,7 @@ tick_callback_for_1_frame (GtkWidget *widget,
gpointer unused)
{
reftest_uninhibit_snapshot ();
gtk_widget_queue_draw (widget);
return G_SOURCE_REMOVE;
}