clutter/script-parser: Don't skip construct parameters when constructing

The script parser only included G_PARAM_CONSTRUCT_ONLY parameters when
constructing objects. This causes issues if an object requires a
parameter to be set during construction, but may also change after. Fix
this by including G_PARAM_CONSTRUCT parameters when constructing script
objects as well.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1289
This commit is contained in:
Jonas Ådahl 2020-04-17 10:12:33 +02:00 committed by Georges Basile Stavracas Neto
parent 25f9406e69
commit 6754195580

View File

@ -1523,7 +1523,7 @@ clutter_script_construct_parameters (ClutterScript *script,
continue; continue;
} }
if (!(pspec->flags & G_PARAM_CONSTRUCT_ONLY)) if (!(pspec->flags & (G_PARAM_CONSTRUCT | G_PARAM_CONSTRUCT_ONLY)))
{ {
unparsed = g_list_prepend (unparsed, pinfo); unparsed = g_list_prepend (unparsed, pinfo);
continue; continue;