[PATCH 2/3] evdev: avoid sending back to clients events generated by accelerometers

Kristian Høgsberg krh at bitplanet.net
Fri Aug 19 06:53:29 PDT 2011


On Fri, Aug 19, 2011 at 9:50 AM, Tiago Vignatti
<tiago.vignatti at linux.intel.com> wrote:
> On 08/19/2011 04:39 PM, Kristian Høgsberg wrote:
>>
>> On Fri, Aug 19, 2011 at 8:06 AM, Tiago Vignatti
>> <tiago.vignatti at intel.com>  wrote:
>>>
>>> As a general rule we don't want to restrict the registration of any
>>> input devices in the compositor. So instead ignoring accelerometer type
>>> of devices, this patch introduces the concept of devices with cursor
>>> (has_cursor), where motion events will be generated only on those.
>>
>> I'd rather just not add the device in this case.  Just return -1 from
>> evdev_configure_device() and then free the struct and return NULL in
>> evdev_input_device_create().  And dont use stdbool.h, we just use
>> ints.
>
> that was my initial idea, but I guess we briefly talked about not ignoring
> any input device and this patch was an attempt to force someone more
> motivated later on building such support - I envision some client that will
> want to get data from accelerometer for gaming maybe and bypass the
> compositor & xkbcommon doesn't seem quite smart.

We definitely need to handle it eventually, but as long as we're just
ignoring it, I'd rather not add it to the event loop.

Kristian


More information about the wayland-devel mailing list