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:
parent
b921ce215f
commit
c9864b1ebc
1 changed files with 10 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue