wl_tablet specification draft

Pekka Paalanen ppaalanen at gmail.com
Mon Jun 30 00:46:34 PDT 2014


On Sun, 29 Jun 2014 23:43:21 -0700
Bill Spitzak <spitzak at gmail.com> wrote:

> On 06/29/2014 11:33 PM, Pekka Paalanen wrote:
> 
> >> moving the visible cursor doesn't necessarily mean that it must translate
> >> into the wl_pointer protocol. It's probably awkward at first if the pointer
> >> moves and clients don't react to it but if we essentially require the
> >> toolkits to support wl_tablet then this will go away quickly.
> >
> > I suspect it will be very hairy to make that work. Clients always set
> > the pointer cursor image when the pointer enters a surface. If you move
> > the cursor without using wl_pointer protocol, what happens with the
> > cursor image?
> 
> I was assuming the enter event contains enough information to know which 
> device is causing it.

It is the wl_pointer of a specific wl_seat:
http://people.collabora.com/~jonny/protocol/wl_pointer.html#Event:enter

No information about the actual physical device at all.

> If not it needs to be extended to contain all the 
> information that is in a "move" event.

It already contains more information than motion:
http://people.collabora.com/~jonny/protocol/wl_pointer.html#Event:motion

No, we are not adding physical device identification to wl_pointer.

> Although this is getting a bit out of this area, imho enter/exit events 
> should be eliminated. There only need to be "move" events, containing 
> the surface they are sent to, the client can detect when the surface 
> changes. There is one hack: if the pointer is moved to another client's 
> surface, the first client gets a move event with a null surface so that 
> does work as an "exit" event, but no extra event type is needed.

So rather than using semantically obvious enter/leave events, you would
rather duplicate the surface designation and event serial in every
motion, button and all other events, causing a more protocol traffic,
and then add hacks to achieve what enter/leave do? I don't think so.
Right now e.g. motion event is the smallest possible: just time and
coordinates.

Note, that wl_pointer.enter is also used in cases where there is no
physical input device action to trigger it. For example, when a window
closes, the pointer can enter the window that was below without any
physical user action. With the current protocol design, motion event is
always from a physical user action, and so we do not need to fake a
timestamp ever. If we had no enter event, motion events would sometimes
have to fake timestamps and perhaps other information. That would be
inconsistent.


Thanks,
pq


More information about the wayland-devel mailing list