On Tue, 2010-10-05 at 18:17 -0700, Ping Cheng wrote: > On Tue, Oct 5, 2010 at 1:22 PM, Chase Douglas > <chase.doug...@canonical.com> wrote: > > Instead of sending events exclusively to the grabbing > > client until the client decides to replay events to other clients, we > > can send all events to all clients, but the non-grabbing clients receive > > the event with a flag set that tells them, "This event is grabbed by > > another client, don't do anything permanent with it." > > So, what is the difference between Keith's suggestion and the > master/passive grab design? I have no problem for all clients to > receive MT data.
To ensure we're on the same page, there are two types of grabs: active and passive. Active grabs ensure all events from a device are grabbed. Passive grabs ensure all events from a device where the events occur in a certain window and while a button or key is held are grabbed. Traditionally, a grab meant that the events are sent only to the grabbing client. For passive grabs, the grabbing client can replay events through X so other non-grabbing clients can see them. This method would add delay to the application specific gesture recognition path as the WM would need to watch events and decide whether to replay them or not. By sending the events to all clients, grabbing or not, simultaneously, we get around this delay. That said, we are only modifying the event handling for grabs. Active and passive grabs will still be maintained with the same semantics in XI 2.1. > > The non-grabbing clients can do things in the background like gesture > > recognition > > processing, or perhaps even an indication on screen (ex. highlighting a > > cell in a list) of what might transpire if the grabbing client decides > > to replay the event. If the events are replayed, the client can then > > commit the action (ex. selecting the cell in the list). If the events > > are not replayed, the clients will receive a notification from the > > server, and the client will undo any hinting and stop any processing of > > the events. > > It would be up to the master grabbing client to decide if it will > release the grab or not even when the touches are outside of its > window (or focus? I am not sure what the right term is), right? This > is close to what in my mind. When and which client will be the next > master is something we have to decide. That's implementation details, > I know :). If I remember correctly, actively grabbed events cannot be replayed. Only passively grabbed events. Since passively grabbed events must start within a particular window, this scenario will never occur. I suggest reading the XI protocol specifications and the X core protocol specification, where the semantics and details of input grabbing are discussed: http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XIproto.txt http://cgit.freedesktop.org/xorg/proto/inputproto/tree/XI2proto.txt ftp://ftp.x.org/pub/X11R7.5/doc/x11proto/proto.pdf -- Chase _______________________________________________ Mailing list: https://launchpad.net/~multi-touch-dev Post to : multi-touch-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~multi-touch-dev More help : https://help.launchpad.net/ListHelp