From e9a0ee69cb81dea2280c0ae2eeea371c70d7911c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Mar 2015 10:42:03 +1000 Subject: [PATCH] Don't unref the device until we're done with it in DEVICE_INIT Signed-off-by: Peter Hutterer --- src/libinput.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libinput.c b/src/libinput.c index 5bcb995..eecd48c 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -632,13 +632,13 @@ xf86libinput_init(DeviceIntPtr dev) if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH)) xf86libinput_init_touch(pInfo); + LibinputInitProperty(dev); + XIRegisterPropertyHandler(dev, LibinputSetProperty, NULL, NULL); + /* unref the device now, because we'll get a new ref during DEVICE_ON */ libinput_device_unref(device); - LibinputInitProperty(dev); - XIRegisterPropertyHandler(dev, LibinputSetProperty, NULL, NULL); - return 0; }