summaryrefslogtreecommitdiff
path: root/plugins/orientation
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-06-02 15:38:06 +0100
committerBastien Nocera <hadess@hadess.net>2011-06-02 15:38:06 +0100
commitf5d7e1cb3cab62818d85f24eb5811297514a815c (patch)
treeb4983d305f02565a4b883ac6402289c25cf13506 /plugins/orientation
parent0e9b63ed1e029a086de35844ab06c7ba0f9cdff1 (diff)
downloadgnome-settings-daemon-f5d7e1cb3cab62818d85f24eb5811297514a815c.tar.gz
orientation: Use new disable/enable device code
Diffstat (limited to 'plugins/orientation')
-rw-r--r--plugins/orientation/gsd-orientation-manager.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/orientation/gsd-orientation-manager.c b/plugins/orientation/gsd-orientation-manager.c
index f1395494..c6e99df5 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",