diff options
author | Ted Gould <ted@canonical.com> | 2009-10-07 12:59:45 -0400 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-10-07 12:59:45 -0400 |
commit | 48041167ace7d6dc1862dc61a9ac015f21ee81d2 (patch) | |
tree | f18a92b6b0b5a3663a954314902df5a12bf84f92 /src/session-service.c | |
parent | 158293e30266fe0de1e88db8758118ac862a147b (diff) | |
parent | 1b12089eb7897608478ce4c3ab9b58361cbe991f (diff) | |
download | ayatana-indicator-session-48041167ace7d6dc1862dc61a9ac015f21ee81d2.tar.gz ayatana-indicator-session-48041167ace7d6dc1862dc61a9ac015f21ee81d2.tar.bz2 ayatana-indicator-session-48041167ace7d6dc1862dc61a9ac015f21ee81d2.zip |
releasing version 0.1.6-0ubuntu3~ppa2~betterlock2
Diffstat (limited to 'src/session-service.c')
-rw-r--r-- | src/session-service.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/session-service.c b/src/session-service.c index 3c0535f..a4240be 100644 --- a/src/session-service.c +++ b/src/session-service.c @@ -55,6 +55,14 @@ static DbusmenuMenuitem * logout_mi = NULL; static DbusmenuMenuitem * restart_mi = NULL; static DbusmenuMenuitem * shutdown_mi = NULL; +/* A return from the command to sleep the system. Make sure + that we unthrottle the screensaver. */ +static void +sleep_response (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data) +{ + screensaver_unthrottle(); + return; +} /* Let's put this machine to sleep, with some info on how it should sleep. */ @@ -67,12 +75,15 @@ sleep (DbusmenuMenuitem * mi, gpointer userdata) g_warning("Can not %s as no DeviceKit Power Proxy", type); } + screensaver_throttle(type); lock_screen(NULL, NULL); - dbus_g_proxy_call_no_reply(dkp_main_proxy, - type, - G_TYPE_INVALID, - G_TYPE_INVALID); + dbus_g_proxy_begin_call(dkp_main_proxy, + type, + sleep_response, + NULL, + NULL, + G_TYPE_INVALID); return; } |