[gnome-settings-daemon] orientation: Use new disable/enable device code
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] orientation: Use new disable/enable device code
- Date: Thu, 2 Jun 2011 14:39:06 +0000 (UTC)
commit f5d7e1cb3cab62818d85f24eb5811297514a815c
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jun 2 15:38:06 2011 +0100
orientation: Use new disable/enable device code
plugins/orientation/gsd-orientation-manager.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plugins/orientation/gsd-orientation-manager.c b/plugins/orientation/gsd-orientation-manager.c
index f139549..c6e99df 100644
--- a/plugins/orientation/gsd-orientation-manager.c
+++ b/plugins/orientation/gsd-orientation-manager.c
@@ -107,10 +107,14 @@ client_uevent_cb (GUdevClient *client,
g_debug ("Received an event from the accelerometer");
+ set_device_enabled (manager->priv->device_id, TRUE);
+
/* FIXME
- * re-enabled the device, open it and read its orientation
+ * open and read the device's orientation
* with XISelectEvent(dpy, DefaultRootWindow(dpy), { event mask with XI_RawMotion })
*/
+
+ set_device_enabled (manager->priv->device_id, FALSE);
}
static gboolean
@@ -129,7 +133,7 @@ gsd_orientation_manager_idle_cb (GsdOrientationManager *manager)
manager->priv->device_node,
manager->priv->device_id);
- /* FIXME disable accelerometer now with "Device Enabled" */
+ set_device_enabled (manager->priv->device_id, FALSE);
manager->priv->client = g_udev_client_new (subsystems);
g_signal_connect (G_OBJECT (manager->priv->client), "uevent",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]