ecore-x: add new grab touch devices functionality

Desktop / Enlightenment / EFL Core Libraries - Lukasz Stanislawski [samsung.com] - 4 June 2015 12:06 UTC

Summary: EFL currently supports pointer grabbing. This patch introduces new API allowing to grab all slave touch devices registered in X server Grabbing is performed by XIGrabDevice function from XInput 2.0.

By default ecore_x_input_touch_devices_grab grabs all XISlavePointer devices, having XITouchInfoClass. Function returns EINA_TRUE if at least one touch device was successfully grabbed. ecore_x_input_touch_devices_ungrab ungrabs all previously grabbed devices.

To process events correctly change has been done in x_input_handler to emulate mouse pointer events. If XITouchEmulatingPointer flag is set on touch events and device is grabbed framework will generate mouse events. This is required due to X Server design in which mouse events are no longer send to client when device is detached (grabbed) from virtual core pointer.

@feature

Reviewers: cedric, raster, devilhorns

Subscribers: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D2568

2017c8b ecore-x: add new grab touch devices functionality.
src/lib/ecore_x/Ecore_X.h | 2 +
src/lib/ecore_x/xcb/ecore_xcb_input.c | 14 ++++
src/lib/ecore_x/xlib/ecore_x_xi2.c | 117 ++++++++++++++++++++++++++++++++-
3 files changed, 132 insertions(+), 1 deletion(-)

Upstream: git.enlightenment.org


  • Share