Some of my thoughts on input for wayland

Daniel Stone daniel at fooishbar.org
Mon Jan 24 14:27:25 PST 2011


Hi,

On Mon, Jan 24, 2011 at 01:04:35PM -0800, Bill Spitzak wrote:
> Chase Douglas wrote:
> >Heh, I've heard his distaste of grabs. I haven't had a chance to
> >research other mechanisms, so I'm just going on what I know through X.
> >I'm certainly not opposed to a better mechanism :).
> 
> I really believe passive grabs can be replaced by adding an API that
> says "I did not handle this event". It can then be passed to another
> window. The typical grabber would be the *last* one in line, not the
> first. Wayland itself would have simple unchangable rules about what
> windows receive events, but these rules produce a list and it tries
> each in turn.
> 
> Grabs have the unfortunate problem that the grabber cannot change
> it's mind, and grabs must always be obscure key combinations and
> sequences to avoid the chance that they will interfere with some
> program.

Er, grabs do have that ability: see the ReplayPointer and ReplayKeyboard
arguments to XAllowEvents.

The problem with that is that you're introducing latency: you're sending
the event through the X server to app A, which rejects it and asks the X
server to pass it on to app B, which rejects it and asks the X server to
pass it on to app C, etc.  The X server is probably busy doing a million
other things, so the latency stacks up quite badly.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20110125/3916506f/attachment.pgp>


More information about the wayland-devel mailing list