[Xevie] Re: Invitation to a discussion about an External Event
Manager
Deron Johnson
Deron.Johnson at Sun.COM
Fri Sep 17 14:14:43 UTC 2004
Keith Packard wrote:
> Hmm. I've read through the section on the Event Controller and I still can't
> see why X grab processing must be duplicated within the LG Display
> Server.
If the grab processing for X windows is done in the X server and grab
processing for 3D apps is done in the Display Server race conditions
can develop. Here is one I thought of off the top of my head. There
are probably others.
When the DS encounters an event destined for an X window, it is sent
back to the X server. Lets say the X server searches for passive grabs
on this event and lets say it finds one. The passive grab triggers
into an active grab. Now that an active grab is in effect, all device
input events for the grabbed device must go to the grab window. So the
X server must tell the Display Server that an active grab is in effect
so the Display Server can send all events back to the X server. The
problem is that during the time the passive grab search is taking
place and the active grab triggering is taking place and the X server
is sending the active grab notification to the Display Server, the
Display Server's event queue keeps flowing unhindered. The problem is
that all of this grab processing taking place in the X server is
completely asynchronous from the Display Server's processing of events
in its queue. This means that events can arrive from the mouse, go to
the Display Server and be distributed to 3D apps during this time.
This scenario illustrates that all grab processing in a 3D window
system must be atomic with respect to the event queue; we can't have X
grab processing occuring asynchronously from the rest of the input
processing. This is why I believe we must do all of the grab processing
in the Display Server and no grab processing should occur in the X server.
More information about the xevie
mailing list