From 2340af8d93f09cc012e3f74ec1f1713b9ba48554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Sun, 29 May 2022 00:09:33 +0200 Subject: [PATCH] Remove meta_get_backend() It should be retrieved from the context via an ownership chain. Part-of: --- src/backends/meta-backend.c | 18 ------------------ src/meta/meta-backend.h | 3 --- 2 files changed, 21 deletions(-) diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c index c5c367c29..a7dc64ff9 100644 --- a/src/backends/meta-backend.c +++ b/src/backends/meta-backend.c @@ -116,23 +116,8 @@ enum static guint signals[N_SIGNALS]; -static MetaBackend *_backend; - #define HIDDEN_POINTER_TIMEOUT 300 /* ms */ -/** - * meta_get_backend: - * - * Accessor for the singleton MetaBackend. - * - * Returns: (transfer none): The only #MetaBackend there is. - */ -MetaBackend * -meta_get_backend (void) -{ - return _backend; -} - struct _MetaBackendPrivate { MetaContext *context; @@ -213,8 +198,6 @@ meta_backend_dispose (GObject *object) MetaBackend *backend = META_BACKEND (object); MetaBackendPrivate *priv = meta_backend_get_instance_private (backend); - _backend = NULL; - g_clear_pointer (&priv->cursor_tracker, meta_cursor_tracker_destroy); g_clear_object (&priv->current_device); g_clear_object (&priv->color_manager); @@ -1236,7 +1219,6 @@ initable_iface_init (GInitableIface *initable_iface) static void meta_backend_init (MetaBackend *backend) { - _backend = backend; } /** diff --git a/src/meta/meta-backend.h b/src/meta/meta-backend.h index 05fb47234..d65c2fb8d 100644 --- a/src/meta/meta-backend.h +++ b/src/meta/meta-backend.h @@ -43,9 +43,6 @@ typedef enum _MetaBackendCapabilities META_EXPORT G_DECLARE_DERIVABLE_TYPE (MetaBackend, meta_backend, META, BACKEND, GObject) -META_EXPORT -MetaBackend * meta_get_backend (void); - META_EXPORT void meta_backend_set_keymap (MetaBackend *backend, const char *layouts,