[PATCH xf86-input-libinput 1/2] Block input events while creating the virtual subdevices

Hans de Goede hdegoede at redhat.com
Tue Aug 9 06:28:32 UTC 2016


Hi,

On 09-08-16 01:42, Peter Hutterer wrote:
> If an event comes in halfway through the new device creation we read it from
> libinput's epollfd but depending on the setup stage the new device may not be
> ready yet.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=97117
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>

Both patches look good to me and are:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


> ---
>  src/xf86libinput.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/src/xf86libinput.c b/src/xf86libinput.c
> index fff59b3..5873e45 100644
> --- a/src/xf86libinput.c
> +++ b/src/xf86libinput.c
> @@ -2394,10 +2394,20 @@ xf86libinput_hotplug_device(struct xf86libinput_hotplug_info *hotplug)
>  {
>  	DeviceIntPtr dev;
>
> +#if HAVE_THREADED_INPUT
> +	input_lock();
> +#else
> +	int sigstate = xf86BlockSIGIO();
> +#endif
>  	if (NewInputDeviceRequest(hotplug->input_options,
>  				  hotplug->attrs,
>  				  &dev) != Success)
>  		dev = NULL;
> +#if HAVE_THREADED_INPUT
> +	input_unlock();
> +#else
> +	xf86UnblockSIGIO(sigstate);
> +#endif
>
>  	input_option_free_list(&hotplug->input_options);
>  	FreeInputAttributes(hotplug->attrs);
>


More information about the xorg-devel mailing list