From 6ada583c9afad2a0d7bca0859af27583b8bcfca4 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 2 Jun 2011 18:37:48 +0100 Subject: orientation: Re-enable the accelerometer on exit --- plugins/orientation/gsd-orientation-manager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/orientation') diff --git a/plugins/orientation/gsd-orientation-manager.c b/plugins/orientation/gsd-orientation-manager.c index 8e2da4ff..6b77298b 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); -- cgit v1.2.1