[mutter] main: Expose hooks to manage context with more granularity
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] main: Expose hooks to manage context with more granularity
- Date: Sat, 13 Mar 2021 19:23:47 +0000 (UTC)
commit 12f2fcd3325ec20f9f99e75bad69272ba5aadab1
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Mar 12 08:42:00 2021 +0100
main: Expose hooks to manage context with more granularity
This is to allow gnome-shell to tear down more gracefully. It's a stop
gap solution until there is a better context handling system, but will
have to do for now.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1775>
src/core/main-private.h | 6 ------
src/core/main.c | 8 +++++++-
src/meta/main.h | 11 +++++++++++
3 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/src/core/main-private.h b/src/core/main-private.h
index 7e6d6eba7f..7065209955 100644
--- a/src/core/main-private.h
+++ b/src/core/main-private.h
@@ -57,10 +57,4 @@ MetaDisplayPolicy meta_get_x11_display_policy (void);
META_EXPORT_TEST
void meta_override_x11_display_policy (MetaDisplayPolicy x11_display_policy);
-META_EXPORT_TEST
-void meta_start (void);
-
-META_EXPORT_TEST
-void meta_run_main_loop (void);
-
#endif /* META_MAIN_PRIVATE_H */
diff --git a/src/core/main.c b/src/core/main.c
index c189eceb54..3c9f5e17e8 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -358,7 +358,7 @@ meta_select_display (char *display_arg)
g_setenv ("DISPLAY", display_name, TRUE);
}
-static void
+void
meta_finalize (void)
{
MetaDisplay *display = meta_get_display ();
@@ -966,6 +966,12 @@ meta_quit (MetaExitCode code)
}
}
+MetaExitCode
+meta_get_exit_code (void)
+{
+ return meta_exit_code;
+}
+
/**
* prefs_changed_callback:
* @pref: Which preference has changed
diff --git a/src/meta/main.h b/src/meta/main.h
index 5fc4bb892a..c1ba2ce2c0 100644
--- a/src/meta/main.h
+++ b/src/meta/main.h
@@ -75,5 +75,16 @@ void meta_quit (MetaExitCode code);
META_EXPORT
void meta_test_init (void);
+META_EXPORT
+void meta_start (void);
+
+META_EXPORT
+void meta_run_main_loop (void);
+
+META_EXPORT
+void meta_finalize (void);
+
+META_EXPORT
+MetaExitCode meta_get_exit_code (void);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]