[gnome-settings-daemon] orientation: Re-enable the accelerometer on exit



commit 6ada583c9afad2a0d7bca0859af27583b8bcfca4
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jun 2 18:37:48 2011 +0100

    orientation: Re-enable the accelerometer on exit

 plugins/orientation/gsd-orientation-manager.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/orientation/gsd-orientation-manager.c b/plugins/orientation/gsd-orientation-manager.c
index 8e2da4f..6b77298 100644
--- a/plugins/orientation/gsd-orientation-manager.c
+++ b/plugins/orientation/gsd-orientation-manager.c
@@ -91,6 +91,7 @@ gsd_orientation_manager_init (GsdOrientationManager *manager)
 {
         manager->priv = GSD_ORIENTATION_MANAGER_GET_PRIVATE (manager);
         manager->priv->prev_orientation = ORIENTATION_UNDEFINED;
+        manager->priv->device_id = -1;
 }
 
 static gboolean
@@ -275,7 +276,10 @@ gsd_orientation_manager_stop (GsdOrientationManager *manager)
                 p->sysfs_path = NULL;
         }
 
-        p->device_id = -1;
+	if (p->device_id > 0) {
+		set_device_enabled (p->device_id, TRUE);
+		p->device_id = -1;
+	}
 
         if (p->client) {
                 g_object_unref (p->client);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]