clutter/context: Create a Settings when constructed

Instead of removing Settings.get_default, we mark it as deprecated
as a lot of extensions seems to use it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3977>
This commit is contained in:
Bilal Elmoussaoui
2024-08-20 21:48:34 +02:00
parent 8013049130
commit 1abbfb5ed2
3 changed files with 7 additions and 7 deletions

View File

@ -901,16 +901,15 @@ clutter_settings_init (ClutterSettings *self)
* Return value: (transfer none): the instance of #ClutterSettings. The
* returned object is owned by Clutter and it should not be unreferenced
* directly
*
* Deprecated: Use [method@Clutter.Context.get_settings] instead
*/
ClutterSettings *
clutter_settings_get_default (void)
{
static ClutterSettings *settings = NULL;
ClutterContext *context = _clutter_context_get_default ();
if (G_UNLIKELY (settings == NULL))
settings = g_object_new (CLUTTER_TYPE_SETTINGS, NULL);
return settings;
return clutter_context_get_settings (context);
}
void