Index: gnome-session-2.30.0/gnome-session/gsm-manager.c
===================================================================
--- gnome-session-2.30.0.orig/gnome-session/gsm-manager.c	2010-07-05 00:35:39.205030989 -0400
+++ gnome-session-2.30.0/gnome-session/gsm-manager.c	2010-07-05 00:35:58.653466451 -0400
@@ -84,7 +84,11 @@
 #define KEY_GNOME_SESSION_DIR     "/apps/gnome-session/options"
 #define KEY_AUTOSAVE              KEY_GNOME_SESSION_DIR "/auto_save_session"
 
-#define KEY_SLEEP_LOCK            "/apps/gnome-screensaver/lock_enabled"
+#define KEY_GNOME_SCREENSAVER_DIR "/apps/gnome-screensaver"
+#define KEY_GS_ENABLED            KEY_GNOME_SCREENSAVER_DIR "/idle_activation_enabled"
+
+#define KEY_SLEEP_LOCK            KEY_GNOME_SCREENSAVER_DIR "/lock_enabled"
+
 #define KEY_SLEEP_LOCK_USE_SCREENSAVER "/apps/gnome-power-manager/lock/use_screensaver_settings"
 #define GPM_CONF_LOCK_ON_SUSPEND   "/apps/gnome-power-manager/lock/suspend"
 #define GPM_CONF_LOCK_ON_HIBERNATE "/apps/gnome-power-manager/lock/hibernate"
@@ -134,6 +138,7 @@
         GConfClient            *gconf_client;
         guint                   desktop_notify_id;
         guint                   lockdown_notify_id;
+        guint                   screensaver_notify_id;
 
         DBusGProxy             *bus_proxy;
         DBusGConnection        *connection;
@@ -1403,6 +1408,9 @@
         manager->priv->query_timeout_id = g_timeout_add_seconds (1, (GSourceFunc)_on_query_end_session_timeout, manager);
 }
 
+/* Usage: Notify the presence module when inhibitors are added or
+ * removed, or the screensaver is enabled or disabled.
+ */
 static void
 update_idle (GsmManager *manager)
 {
@@ -2374,6 +2382,14 @@
                                                     manager->priv->lockdown_notify_id);
                         manager->priv->lockdown_notify_id = 0;
                 }
+                if (manager->priv->screensaver_notify_id != 0) {
+                        gconf_client_remove_dir (manager->priv->gconf_client,
+                                                 KEY_GNOME_SCREENSAVER_DIR,
+                                                 NULL);
+                        gconf_client_notify_remove (manager->priv->gconf_client,
+                                                    manager->priv->screensaver_notify_id);
+                        manager->priv->screensaver_notify_id = 0;
+                }
 
                 g_object_unref (manager->priv->gconf_client);
                 manager->priv->gconf_client = NULL;
@@ -2531,7 +2547,8 @@
         key = gconf_entry_get_key (entry);
 
         if (! g_str_has_prefix (key, KEY_DESKTOP_DIR)
-            && ! g_str_has_prefix (key, KEY_LOCKDOWN_DIR)) {
+            && ! g_str_has_prefix (key, KEY_LOCKDOWN_DIR)
+            && ! g_str_has_prefix (key, KEY_GNOME_SCREENSAVER_DIR)) {
                 return;
         }
 
@@ -2568,6 +2585,20 @@
                 } else {
                         invalid_type_warning (key);
                 }
+        } else if (strcmp (key, KEY_GS_ENABLED) == 0) {
+
+                if (value->type == GCONF_VALUE_BOOL) {
+                        /* Ignore the value. */
+
+                        /* We need to notify the presence module when
+                         * the user enables the screensaver, so that
+                         * it knows to re-activate the idle timer.  We
+                         * abuse update_idle to do this.
+                         */
+                        update_idle (manager);
+                } else {
+                        invalid_type_warning (key);
+                }
 
         } else {
                 g_debug ("Config key not handled: %s", key);
@@ -2621,6 +2652,9 @@
         gconf_client_add_dir (manager->priv->gconf_client,
                               KEY_LOCKDOWN_DIR,
                               GCONF_CLIENT_PRELOAD_NONE, NULL);
+        gconf_client_add_dir (manager->priv->gconf_client,
+                              KEY_GNOME_SCREENSAVER_DIR,
+                              GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
 
         manager->priv->desktop_notify_id = gconf_client_notify_add (manager->priv->gconf_client,
                                                                     KEY_DESKTOP_DIR,
@@ -2632,6 +2666,11 @@
                                                                      (GConfClientNotifyFunc)on_gconf_key_changed,
                                                                      manager,
                                                                      NULL, NULL);
+        manager->priv->screensaver_notify_id = gconf_client_notify_add (manager->priv->gconf_client,
+                                                                        KEY_GNOME_SCREENSAVER_DIR,
+                                                                        (GConfClientNotifyFunc)on_gconf_key_changed,
+                                                                        manager,
+                                                                        NULL, NULL);
 
         load_idle_delay_from_gconf (manager);
 }
