[PATCH wayland-protocols] Add the tablet protocol
Bill Spitzak
spitzak at gmail.com
Mon Nov 16 10:46:24 PST 2015
There is a need to distinguish proximity-out from exit events. It is quite
possible to move the stylus so that the focus enters another client without
doing a proximity-out. Clients are interested in distinguishing these.
I really feel the best method is to say a "seat" has a keyboard focus and a
pointer focus, and let the stylus manipulate the pointer focus. Thus the
client will get enter/exit events as the stylus is moved around above the
tablet, and proximity in/out when it is moved toward/away from the tablet
(it may also get a fake proximity-in event on enter).
I really feel the cursor stuff is a huge mistake. It adds lots of
complexity for almost no actual gain. Witness how much code you had to add
to toytoolkit to support it. It adds complexity to clients as the client
has to pass which tool to subroutines for no reason other than to allow
them to change the correct cursor. The clients cannot assume the tool has
the "right" cursor and therefore they are required to have code to change
it, so this removes no complexity from clients. It is also hugely
inconsistent with how normal pointer enter events are handled in Wayland.
I would change this so the cursor remains the wl_pointer cursor, and
exactly the same code is used by the client to change the cursor as it does
for wl_pointer. The fact that you need to use the wl_pointer interface to
deal with stylus events can be considered a historical artefact, they
should have been on the wl_seat.
The only argument you had was that the cursor is more likely to be correct,
so when the proximity-in event happens, the cursor that appears has a
higher chance of being the same as the one the client sets and there will
be less blinking. However this can be implemented by the compositor without
any client api. Just have the compositor remember what cursor was used and
set that as a guess on the enter event. The client can remain completely
unaware of whether a cursor is remembered per-tool, or per-surface, or per
tool*surface, or whatever.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151116/5b3381bb/attachment.html>
More information about the wayland-devel
mailing list