diff options
author | Keith Packard <keithp@keithp.com> | 2015-12-07 15:33:39 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2015-12-07 17:03:12 -0800 |
commit | e09bb37311ea9ce866aec24729568a96b0deda43 (patch) | |
tree | 044a7450225412799e6938df51b845beebcf1d20 /src/xf86libinput.c | |
parent | 1f43f3921f6ceebd9a0cb92ef998a930d5fc3a3e (diff) |
This lets the xfree86 layer change to the NotifyFd interface without
affecting the driver.
v2: Check for new API in configure.ac and use only if present
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/xf86libinput.c')
-rw-r--r-- | src/xf86libinput.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/xf86libinput.c b/src/xf86libinput.c index ee2165a..16abe76 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -480,8 +480,12 @@ xf86libinput_on(DeviceIntPtr dev) pInfo->fd = libinput_get_fd(libinput); if (driver_context.device_enabled_count == 0) { +#if HAVE_ADD_ENABLED_DEVICE_SERIALIZED + xf86AddEnabledDeviceSerialized(pInfo); +#else /* Can't use xf86AddEnabledDevice on an epollfd */ AddEnabledDevice(pInfo->fd); +#endif } driver_context.device_enabled_count++; @@ -500,7 +504,11 @@ xf86libinput_off(DeviceIntPtr dev) struct xf86libinput_device *shared_device = driver_data->shared_device; if (--driver_context.device_enabled_count == 0) { +#if HAVE_ADD_ENABLED_DEVICE_SERIALIZED + xf86RemoveEnabledDevice(pInfo); +#else RemoveEnabledDevice(pInfo->fd); +#endif } if (use_server_fd(pInfo)) { |