context: Make context owner of MetaDisplay

It may still be closed from elsewhere, e.g. when being replaced, but the
reference is owned by MetaContext instead of itself.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl
2021-03-03 15:12:19 +01:00
parent b1c643eeaa
commit 68b376a944
4 changed files with 32 additions and 23 deletions

View File

@ -25,6 +25,7 @@
#include "meta/common.h"
#include "meta/meta-enums.h"
#include "meta/types.h"
#define META_TYPE_CONTEXT (meta_context_get_type ())
META_EXPORT
@ -84,4 +85,7 @@ MetaCompositorType meta_context_get_compositor_type (MetaContext *context);
META_EXPORT
MetaBackend * meta_context_get_backend (MetaContext *context);
META_EXPORT
MetaDisplay * meta_context_get_display (MetaContext *context);
#endif /* META_CONTEXT_H */