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>
This commit is contained in:
Jonas Ådahl 2021-03-12 08:42:00 +01:00 committed by Marge Bot
parent c3aa32987a
commit 12f2fcd332
3 changed files with 18 additions and 7 deletions

View File

@ -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 */

View File

@ -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

View File

@ -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