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.
This commit is contained in:
Emmanuele Bassi 2009-11-24 17:54:02 +00:00
parent 687c70dffa
commit 130286979d

View File

@ -270,6 +270,13 @@ _clutter_device_manager_update_devices (ClutterDeviceManager *device_manager)
{ {
GSList *d; 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) for (d = device_manager->devices; d != NULL; d = d->next)
{ {
ClutterInputDevice *device = d->data; ClutterInputDevice *device = d->data;