summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2022-09-08 00:06:44 +0200
committerRobert Mader <robert.mader@posteo.de>2022-12-17 15:13:48 +0100
commit471d23ba4351d5bc5fbd7bdee730011b83786279 (patch)
treece1ac071114a38474988ef7936b9b17936031c79
parentd7f26136b497be6e852efb6359b5fe00dde4868e (diff)
downloadmutter-471d23ba4351d5bc5fbd7bdee730011b83786279.tar.gz
Remove meta_get_display()
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718>
-rw-r--r--src/core/display-private.h3
-rw-r--r--src/core/display.c29
2 files changed, 1 insertions, 31 deletions
diff --git a/src/core/display-private.h b/src/core/display-private.h
index f82fb8ba2..9ac6d21a1 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -298,9 +298,6 @@ META_EXPORT_TEST
GSList* meta_display_list_windows (MetaDisplay *display,
MetaListWindowsFlags flags);
-META_EXPORT_TEST
-MetaDisplay* meta_get_display (void);
-
void meta_display_reload_cursor (MetaDisplay *display);
void meta_display_update_cursor (MetaDisplay *display);
diff --git a/src/core/display.c b/src/core/display.c
index 03e258a3a..6c320d0f4 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -188,14 +188,6 @@ static guint display_signals [LAST_SIGNAL] = { 0 };
#define META_GRAB_OP_GET_BASE_TYPE(op) (op & 0x00FF)
-/*
- * The display we're managing. This is a singleton object. (Historically,
- * this was a list of displays, but there was never any way to add more
- * than one element to it.) The goofy name is because we don't want it
- * to shadow the parameter in its object methods.
- */
-static MetaDisplay *the_display = NULL;
-
static void on_monitors_changed_internal (MetaMonitorManager *monitor_manager,
MetaDisplay *display);
@@ -864,8 +856,7 @@ meta_display_new (MetaContext *context,
MetaMonitorManager *monitor_manager;
MetaSettings *settings;
- g_assert (the_display == NULL);
- display = the_display = g_object_new (META_TYPE_DISPLAY, NULL);
+ display = g_object_new (META_TYPE_DISPLAY, NULL);
priv = meta_display_get_instance_private (display);
priv->context = context;
@@ -1152,8 +1143,6 @@ meta_display_close (MetaDisplay *display,
return;
}
- g_assert (display == the_display);
-
display->closing += 1;
g_signal_emit (display, display_signals[CLOSING], 0);
@@ -1204,22 +1193,6 @@ meta_display_close (MetaDisplay *display,
meta_clipboard_manager_shutdown (display);
g_clear_object (&display->selection);
g_clear_object (&display->pad_action_mapper);
-
- the_display = NULL;
-}
-
-/**
- * meta_get_display:
- *
- * Accessor for the singleton MetaDisplay.
- *
- * Returns: The only #MetaDisplay there is. This can be %NULL, but only
- * during startup.
- */
-MetaDisplay*
-meta_get_display (void)
-{
- return the_display;
}
static inline gboolean