mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 13:24:09 +00:00
main: Let session management code deal with DESKTOP_AUTOSTART_ID
No need to have that outside of meta_session_init(). Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1833>
This commit is contained in:
parent
25e2839339
commit
62ef293cdb
@ -887,23 +887,8 @@ void
|
||||
meta_register_with_session (void)
|
||||
{
|
||||
if (!opt_disable_sm)
|
||||
{
|
||||
if (opt_client_id == NULL)
|
||||
{
|
||||
const gchar *desktop_autostart_id;
|
||||
meta_session_init (opt_client_id, opt_save_file);
|
||||
|
||||
desktop_autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
|
||||
|
||||
if (desktop_autostart_id != NULL)
|
||||
opt_client_id = g_strdup (desktop_autostart_id);
|
||||
}
|
||||
|
||||
/* Unset DESKTOP_AUTOSTART_ID in order to avoid child processes to
|
||||
* use the same client id. */
|
||||
g_unsetenv ("DESKTOP_AUTOSTART_ID");
|
||||
|
||||
meta_session_init (opt_client_id, opt_save_file);
|
||||
}
|
||||
/* Free memory possibly allocated by the argument parsing which are
|
||||
* no longer needed.
|
||||
*/
|
||||
|
@ -233,6 +233,16 @@ meta_session_init (const char *previous_client_id,
|
||||
SmcCallbacks callbacks;
|
||||
char *saved_client_id;
|
||||
|
||||
if (!previous_client_id)
|
||||
{
|
||||
const char *desktop_autostart_id;
|
||||
|
||||
desktop_autostart_id = g_getenv ("DESKTOP_AUTOSTART_ID");
|
||||
if (desktop_autostart_id)
|
||||
previous_client_id = desktop_autostart_id;
|
||||
}
|
||||
g_unsetenv ("DESKTOP_AUTOSTART_ID");
|
||||
|
||||
meta_topic (META_DEBUG_SM, "Initializing session with save file '%s'",
|
||||
previous_save_file ? previous_save_file : "(none)");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user