x11: Add support for touch events

For the time being, we just relay everything we get from the X server to
the Clutter application.
This commit is contained in:
Emmanuele Bassi
2012-03-19 14:28:34 +00:00
parent d15b828cc5
commit 09a317d23d
6 changed files with 207 additions and 1 deletions

View File

@ -92,6 +92,16 @@ clutter_input_device_xi2_select_stage_events (ClutterInputDevice *device,
if (event_mask & LeaveWindowMask)
XISetMask (mask, XI_Leave);
#ifdef XINPUT_2_2
/* enable touch event support if we're running on XInput 2.2 */
if (backend_x11->xi_minor >= 2)
{
XISetMask (mask, XI_TouchBegin);
XISetMask (mask, XI_TouchUpdate);
XISetMask (mask, XI_TouchEnd);
}
#endif /* XINPUT_2_2 */
xi_event_mask.deviceid = device_xi2->device_id;
xi_event_mask.mask = mask;
xi_event_mask.mask_len = len;