[PATCH] wayland: Add wl_keyboard:keys_update()
Bill Spitzak
spitzak at gmail.com
Mon Jun 10 12:56:54 PDT 2013
Martin Minarik wrote:
> * The client are perhaps more interested in knowing which keys changed,
> not what is the actual state. Delivering state is less flexible because
> it requires the client to keep track of state, if it wants to know what
> changed. But the compositor knows what changed. Client would have to compute
> this again.
I find the above explanation extremely hard to believe.
In every ui code I have ever worked on the only thing it is interested
in is "are any buttons held down". I can assure you it is many times
easier to reliably implement this from an array of what buttons are down.
Also this design requires both the client and compositor to remember the
previous state. Generating the state change from a state array only
requires the client to remember the previous state, saving one copy.
Also avoiding extremely nasty bugs when the compositor and client get
out of sync!
More information about the wayland-devel
mailing list