[RFC] weston: implement inert objects for keyboard/pointer/touch
Derek Foreman
derekf at osg.samsung.com
Tue Oct 20 11:48:53 PDT 2015
On 19/10/15 08:47 AM, David FORT 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).
I agree that weston_seat_init_* are bad names. weston_seat_add_*_device
does seem more reasonable to me.
(weston_seat_release_* seems sensible enough as it is.)
> 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) ?
Michal Suchanek already explained this perfectly, but I'll chime in with
"me too" - we absolutely need to retain that stuff.
(I can almost hear Bryce recommending we test for retained pointer state
in devices_test... that'd be good at some point but not a pre-requisite
for this work...)
Guess that leaves you in a bad place regarding keyboard/pointer/touch
destruction? I think it's not insurmountable though - I think when a
*seat* is destroyed that information should be removed.
I think this also answers your question of who should do the
refcounting? If weston core is storing the retained state, I think it
needs to be responsible for the refcounting?
The RDP back-end has seats that come and go, I don't think the DRM
compositor should ever actually destroy a seat... Does that make sense
or am I crazy? :)
Oh, I also agree with Bryce that it looks like this is two patches
pushed together - one with a lot of "if (!keyboard) dont_crash()" stuff
that we could review and land as an independent patch. That stuff will
be an easy review and it'll make the actual "inert object" stuff easier
to look at too.
> David FORT (1):
> weston: implement inert objects for keyboard/pointer/touch
>
> desktop-shell/exposay.c | 16 ++--
> desktop-shell/shell.c | 21 ++--
> src/compositor-wayland.c | 10 +-
> src/compositor-x11.c | 12 ++-
> src/input.c | 242 +++++++++++++++++++++++++++--------------------
> src/libinput-device.c | 2 +-
> src/screen-share.c | 2 +
> src/text-backend.c | 44 +++++----
> src/zoom.c | 7 +-
> tests/weston-test.c | 18 ++--
> xwayland/dnd.c | 3 +-
> 11 files changed, 224 insertions(+), 153 deletions(-)
>
More information about the wayland-devel
mailing list