mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 20:32:16 +00:00
backend: Add a backend release function
Mutter still relies heavily on singletons such as its MetaBackend. For that, the backend implementation has a meta_init_backend() function which is called at startup from meta_init(), which creates the desired backend and sets the singleton which is returned by meta_get_backend(). Unfortunately, that means that the backend is never actually freed, and all the code from the backend finalize function never actually get called. Add a meta_release_backend() to free the backend singleton. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1438
This commit is contained in:
parent
c956193d09
commit
6db7d8f830
@ -108,6 +108,7 @@ struct _MetaBackendClass
|
||||
};
|
||||
|
||||
void meta_init_backend (GType backend_gtype);
|
||||
void meta_release_backend (void);
|
||||
|
||||
#ifdef HAVE_WAYLAND
|
||||
MetaWaylandCompositor * meta_backend_get_wayland_compositor (MetaBackend *backend);
|
||||
|
@ -1393,6 +1393,12 @@ meta_init_backend (GType backend_gtype)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
meta_release_backend (void)
|
||||
{
|
||||
g_clear_object (&_backend);
|
||||
}
|
||||
|
||||
/**
|
||||
* meta_is_stage_views_enabled:
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user