From 130286979d04128b51fa8662aa13b6bbd1867ca2 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 24 Nov 2009 17:54:02 +0000 Subject: [PATCH] Do not pick when motion event delivery is disabled The device manager does not need to update the state of the devices when the user has disabled the delivery of motion events to actors: the events will always be delivered as they are to the stage. --- clutter/clutter-device-manager.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/clutter/clutter-device-manager.c b/clutter/clutter-device-manager.c index c38cdd660..11d76a103 100644 --- a/clutter/clutter-device-manager.c +++ b/clutter/clutter-device-manager.c @@ -270,6 +270,13 @@ _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager) { GSList *d; + /* the user disabled motion events delivery on actors; we + * don't perform any picking since the source of the events + * will always be set to be the stage + */ + if (!clutter_get_motion_events_enabled ()) + return; + for (d = device_manager->devices; d != NULL; d = d->next) { ClutterInputDevice *device = d->data;