[RFC] weston: implement inert objects for keyboard/pointer/touch

Michal Suchanek hramrach at gmail.com
Mon Oct 19 07:15:38 PDT 2015


Hello,

On 19 October 2015 at 15:47, David FORT <rdp.effort at gmail.com> wrote:
> This is the second version. I have restored the ref counting of input devices,
> I think with the name weston_seat_init_pointer is not accurate, perhaps
> weston_seat_add_pointer_device would be better. I'm really wondering if it's
> the weston core that should do that refcounting, or if the input backend should
> do it itself. I can't see any case where we would have 2 input backends (which
> would be a justification for weston doing it).
> Note that with this patch, we don't save the last position of the pointer. I'm
> wondering why we wanna do this, does that mean that we want the same kind of
> behaviour for other input devices (saving locks state for keyboard device for
> example) ?
>


On widely used systems that have a pointer the position of relative
pointer is saved across device reconnect. So users will expect that
disconnecting a mouse and connecting another one will not change
pointer position.

Same with keyboard locks. While buttons on a device should be released
on disconnect internal state that is not mechanically represented by
device position should stay. Which includes the pointer position for
devices that drive the pointer with relative axis and state of
keyboard locks that remain locked when the key itself is released.

For devices that drive pointer with absolute axis and have axis that
can be out of proximity and hence can be in state that provides no
pointer position reading the initial pointer position is also needed.
This is like almost all devices, actually.

Since changing the pointer position or keyboard lock state at random
on device reconnect would cause problems for people with USB bus
issues I would think that saving the state is not just something
current systems randomly happen to do. Note that hardware is sometimes
not fixable to work reliably. This is especially true for wireless
buses like Bluetooth.

Thanks

Michal


More information about the wayland-devel mailing list