[PATCH 2/4] X event queue mutex
Peter Hutterer
peter.hutterer at who-t.net
Tue Oct 7 00:43:53 PDT 2008
On Tue, Oct 07, 2008 at 01:46:21AM -0300, Tiago Vignatti wrote:
> A problem that I see is in GetPointerEvents() function. It's bloated and
> confusing. It generates X events and also updates the cursor on screen.
> We don't need to mix this two actions in one function. For instance, I
> did a quickly hack here calling miPointerSetPosition() directly from
> evdev driver (!) instead inside GPE and apparently all worked nice. So
> if we could only put in a separate thread the pieces that deal with
> cursor's update and not related with X events then we'd be winning -- I
> failed to not see this before :(
The actual event generation is the least of your worries here.
GPE basically does:
1. sanity checking
2. get the MD, update the SD from the MD if we switched devices so we can
apply the new coordinates.
3. accelerate motion and/or clip axes as applicable.
4. scale to screen, write it into the MD
5. NOW you have your coordinates you can move to
6. do event-specific stuff you don't have to worry about for displaying the
cursor.
You can't easily get around 1-4 since you won't know the position otherwise.
I'm pretty sure 6 is negligable for processing time since all we're basically
doing there is assigning values to already allocated memory.
Cheers,
Peter
More information about the xorg
mailing list