wacom: Fix event filtering in the calibrator

We were always getting the events from the core pointer instead
of the device itself, so threw all of them away.
We need to get the real source device from the event.

https://bugzilla.gnome.org/show_bug.cgi?id=707784
This commit is contained in:
Bastien Nocera 2013-10-08 11:31:34 +02:00
parent b921ce215f
commit c9864b1ebc

View file

@ -306,9 +306,17 @@ on_button_press_event(ClutterActor *actor,
{
ClutterInputDevice *device;
device = ((ClutterButtonEvent *) event)->device;
if (device != NULL && clutter_input_device_get_device_id (device) != area->device_id)
device = clutter_event_get_source_device ((ClutterEvent *) event);
if (device != NULL && clutter_input_device_get_device_id (device) != area->device_id) {
char *name;
g_object_get (G_OBJECT (device), "name", &name, NULL);
g_debug ("Ignoring input from device %s (%d)",
name,
clutter_input_device_get_device_id (device));
g_free (name);
return FALSE;
}
}
/* Handle click */