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:
@ -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),
|
||||
|
Reference in New Issue
Block a user