From e09bb37311ea9ce866aec24729568a96b0deda43 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 7 Dec 2015 15:33:39 -0800 Subject: Use new xf86AddEnabledDeviceSerialized instead of AddEnabledDevice [v2] 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 --- src/xf86libinput.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/xf86libinput.c') 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)) { -- cgit v1.2.3