shell-global: Add MetaContext getter
Start to use it instead of using g_object_get(). Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1349>
This commit is contained in:
parent
367d40d31b
commit
f171f92522
@ -821,6 +821,17 @@ shell_global_set_stage_input_region (ShellGlobal *global,
|
||||
sync_input_region (global);
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_global_get_context:
|
||||
*
|
||||
* Return value: (transfer none): The #MetaContext
|
||||
*/
|
||||
MetaContext *
|
||||
shell_global_get_context (ShellGlobal *global)
|
||||
{
|
||||
return global->meta_context;
|
||||
}
|
||||
|
||||
/**
|
||||
* shell_global_get_stage:
|
||||
*
|
||||
@ -1269,7 +1280,7 @@ shell_global_reexec_self (ShellGlobal *global)
|
||||
*/
|
||||
pre_exec_close_fds ();
|
||||
|
||||
g_object_get (global, "context", &meta_context, NULL);
|
||||
meta_context = shell_global_get_context (global);
|
||||
meta_context_restore_rlimit_nofile (meta_context, NULL);
|
||||
|
||||
meta_display_close (shell_global_get_display (global),
|
||||
|
@ -15,6 +15,7 @@ G_DECLARE_FINAL_TYPE (ShellGlobal, shell_global, SHELL, GLOBAL, GObject)
|
||||
|
||||
ShellGlobal *shell_global_get (void);
|
||||
|
||||
MetaContext *shell_global_get_context (ShellGlobal *global);
|
||||
ClutterStage *shell_global_get_stage (ShellGlobal *global);
|
||||
MetaDisplay *shell_global_get_display (ShellGlobal *global);
|
||||
GList *shell_global_get_window_actors (ShellGlobal *global);
|
||||
|
Loading…
Reference in New Issue
Block a user