[mutter] Remove meta_quit()



commit 6768b509ea11f1c4cf84fc107202a0a4862daa65
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Mar 3 17:26:47 2021 +0100

    Remove meta_quit()
    
    It is no longer used, so remove it. This also removes the intermediate
    MetaContext global singleton, as it is no longer needed.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>

 src/core/main.c         | 24 ------------------------
 src/core/meta-context.c | 21 ---------------------
 src/meson.build         |  2 +-
 src/meta/main.h         |  4 ----
 4 files changed, 1 insertion(+), 50 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 532dc03794..cd5075936e 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -56,30 +56,6 @@
 MetaContext *
 meta_get_context_temporary (void);
 
-/**
- * meta_quit:
- * @code: The success or failure code to return to the calling process.
- *
- * Stops Mutter. This tells the event loop to stop processing; it is
- * rather dangerous to use this because this will leave the user with
- * no window manager. We generally do this only if, for example, the
- * session manager asks us to; we assume the session manager knows
- * what it's talking about.
- */
-void
-meta_quit (MetaExitCode code)
-{
-  MetaContext *context;
-
-  context = meta_get_context_temporary ();
-  g_assert (context);
-
-  if (code == META_EXIT_SUCCESS)
-    {
-      meta_context_terminate (context);
-    }
-}
-
 static MetaX11DisplayPolicy x11_display_policy_override = -1;
 
 void
diff --git a/src/core/meta-context.c b/src/core/meta-context.c
index 4d299bdafd..47b540afcf 100644
--- a/src/core/meta-context.c
+++ b/src/core/meta-context.c
@@ -454,24 +454,6 @@ meta_context_finalize (GObject *object)
   G_OBJECT_CLASS (meta_context_parent_class)->finalize (object);
 }
 
-/*
- * NOTE!
- *
- * This global singletone is a temporary stop-gap solution
- * to allow migrating to MetaContext in smaller steps. It will
- * be removed later in this series of changes.
- */
-static MetaContext *_context_temporary;
-
-MetaContext *
-meta_get_context_temporary (void);
-
-MetaContext *
-meta_get_context_temporary (void)
-{
-  return _context_temporary;
-}
-
 static void
 meta_context_class_init (MetaContextClass *klass)
 {
@@ -500,9 +482,6 @@ meta_context_init (MetaContext *context)
 {
   MetaContextPrivate *priv = meta_context_get_instance_private (context);
 
-  g_assert (!_context_temporary);
-  _context_temporary = context;
-
   priv->plugin_gtype = G_TYPE_NONE;
 
   if (!setlocale (LC_ALL, ""))
diff --git a/src/meson.build b/src/meson.build
index fc64f7aa1a..4a810fb8d5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -358,8 +358,8 @@ mutter_sources = [
   'core/frame.h',
   'core/keybindings.c',
   'core/keybindings-private.h',
-  'core/main.c',
   'core/main-private.h',
+  'core/main.c',
   'core/meta-accel-parse.c',
   'core/meta-accel-parse.h',
   'core/meta-anonymous-file.c',
diff --git a/src/meta/main.h b/src/meta/main.h
index e03984bb5d..02304e8837 100644
--- a/src/meta/main.h
+++ b/src/meta/main.h
@@ -56,8 +56,4 @@ typedef enum
 META_EXPORT
 void meta_exit (MetaExitCode code) G_GNUC_NORETURN;
 
-/* g_main_loop_quit() then fall out of main() */
-META_EXPORT
-void meta_quit (MetaExitCode code);
-
 #endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]