wayland: Shut up about Setenv if we're past initialization
I'm a bit tired of hearing about this when I launch mutter-wayland nested. Ideally, this would be part of display server integration, not GNOME integration, so we could simply not make the call when nested, but oh well.
This commit is contained in:
parent
cc0488f1e2
commit
208296a619
1 changed files with 5 additions and 4 deletions
|
@ -575,14 +575,13 @@ set_gnome_env (const char *name,
|
|||
const char *value)
|
||||
{
|
||||
GDBusConnection *session_bus;
|
||||
GError *error;
|
||||
GError *error = NULL;
|
||||
|
||||
setenv (name, value, TRUE);
|
||||
|
||||
session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
||||
g_assert (session_bus);
|
||||
|
||||
error = NULL;
|
||||
g_dbus_connection_call_sync (session_bus,
|
||||
"org.gnome.SessionManager",
|
||||
"/org/gnome/SessionManager",
|
||||
|
@ -594,8 +593,10 @@ set_gnome_env (const char *name,
|
|||
-1, NULL, &error);
|
||||
if (error)
|
||||
{
|
||||
meta_warning ("Failed to set environment variable %s for gnome-session: %s\n", name, error->message);
|
||||
g_clear_error (&error);
|
||||
if (g_strcmp0 (g_dbus_error_get_remote_error (error), "org.gnome.SessionManager.NotInInitialization") != 0)
|
||||
meta_warning ("Failed to set environment variable %s for gnome-session: %s\n", name, error->message);
|
||||
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue