diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-07-10 00:08:03 -0500 |
---|---|---|
committer | Charles Kerr <charles.kerr@canonical.com> | 2013-07-10 00:08:03 -0500 |
commit | 4168038976915aea6f73449f145d923cc63bd1be (patch) | |
tree | 3edb1725acfcc2f4019d289ccad525c0461dc108 | |
parent | 6c4e44173ea46125697ed33e989f23db1f36b744 (diff) | |
download | ayatana-indicator-session-4168038976915aea6f73449f145d923cc63bd1be.tar.gz ayatana-indicator-session-4168038976915aea6f73449f145d923cc63bd1be.tar.bz2 ayatana-indicator-session-4168038976915aea6f73449f145d923cc63bd1be.zip |
If g_getenv(XDG_SEAT_PATH) fails, don't try to get the DisplayManager seat. Fixes the greeter issue reported by seb128
-rw-r--r-- | src/backend-dbus/utils.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/backend-dbus/utils.c b/src/backend-dbus/utils.c index 25ac7c3..d1511f4 100644 --- a/src/backend-dbus/utils.c +++ b/src/backend-dbus/utils.c @@ -126,13 +126,15 @@ indicator_session_util_get_session_proxies ( gpointer user_data) { struct session_proxy_data * data; - char * seat_path; + char * login1_seat_path; + const char * dm_seat_path; data = g_new0 (struct session_proxy_data, 1); data->callback = func; data->user_data = user_data; data->cancellable = g_object_ref (cancellable); + /* login1 */ data->pending++; login1_manager_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, @@ -141,15 +143,18 @@ indicator_session_util_get_session_proxies ( data->cancellable, on_login1_manager_ready, data); - data->pending++; - seat_path = g_strconcat ("/org/freedesktop/login1/seat/", g_getenv("XDG_SEAT"), NULL); + /* login1 seat */ + login1_seat_path = g_strconcat ("/org/freedesktop/login1/seat/", g_getenv("XDG_SEAT"), NULL); login1_seat_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "org.freedesktop.login1", - seat_path, + login1_seat_path, data->cancellable, on_login1_seat_ready, data); + g_free (login1_seat_path); + + /* Accounts */ data->pending++; accounts_proxy_new_for_bus (G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, @@ -158,14 +163,16 @@ indicator_session_util_get_session_proxies ( data->cancellable, on_accounts_proxy_ready, data); - data->pending++; - display_manager_seat_proxy_new_for_bus ( + /* DisplayManager seat */ + if ((dm_seat_path = g_getenv ("XDG_SEAT_PATH"))) + { + data->pending++; + display_manager_seat_proxy_new_for_bus ( G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES, "org.freedesktop.DisplayManager", - g_getenv ("XDG_SEAT_PATH"), + dm_seat_path, data->cancellable, on_display_manager_seat_proxy_ready, data); - - g_free (seat_path); + } } |