diff options
author | Bastien Nocera <hadess@hadess.net> | 2011-06-02 18:37:48 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-06-03 01:21:26 +0100 |
commit | 6ada583c9afad2a0d7bca0859af27583b8bcfca4 (patch) | |
tree | 6f72b76f40bda4245a47bdbfcb74de13fcda1470 /plugins/orientation | |
parent | 3ced590719f79ffa7661a815ecead830f0eba272 (diff) | |
download | gnome-settings-daemon-6ada583c9afad2a0d7bca0859af27583b8bcfca4.tar.gz |
orientation: Re-enable the accelerometer on exit
Diffstat (limited to 'plugins/orientation')
-rw-r--r-- | 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 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); |