[mutter/wayland] wayland: Shut up about Setenv if we're past initialization
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] wayland: Shut up about Setenv if we're past initialization
- Date: Wed, 26 Mar 2014 16:04:27 +0000 (UTC)
commit 208296a619c13950877aaea4da4e236bb140a0e2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Mar 26 12:02:08 2014 -0400
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.
src/wayland/meta-wayland.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 79ebd30..12c1935 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -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);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]