The workaround that does this is ugly, but simple.

Every time you get a mouse move event, just warp the pointer back to
some central point.  Then to get the relative motion, compare where the
mouse had been moved to with the point of origin.  I'm not sure, but
maybe that plays hob with mouse acceleration... I dunno.

That, and you can confine a mouse pointer to a particular window, and
then it's really easy to set the mask for the mouse pointer so it is
invisible.  I made a 1 pixel mouse pointer, than masked it out so it was
invisible.

The only problem is I don't know if that technique messes up mouse
acceleration.

And yes, the mouse events come in too slow and irregular.  Be nice to
have some realtime-ish guarantees about the mouse and keyboard input.
Or at least if someone could tell me how to do large image draws without
sacrificing speed, and without blocking processing of mouse events.  Do
I have to fork two processes?  Use two different threads?  Is that safe?
Do I have to break my big draws up into a bunch of smaller draws?  How
can I check for JUST a mouse_move event without blocking and waiting for
an event, ANY event?  I suspect that is possible, it's just not clear
from the manpages.  Could anyone show me such a snippet?

Jonathan

On Thu, Jun 13, 2002 at 09:17:05PM +0200, Lionel Ulmer wrote:
>>    I've been thinking that we need a new extension for better
>> pointer motion in video games and other interactive applications.
>> I came to that conclusion a couple years ago and now I wish that
>> I had been more proactive back then.
>(...)
>>    Is it generally agreed that this would be a good thing?
>
>Well, I wanted to work on something like that for a long time now but never
>got the courage to go deep enough in the XFree code to actually start
>anything. If you remember well, I once asked a long time ago on this list if
>an extension like that was possible / doable...
>
>It is sorely needed by things like Wine to emulate relative mouse grabbing
>in DirectInput games :-)
>
>So yes, I fully support this (and am ready to act as a guinea pig / tester
>for you if you need one).

-- 
                     Geek House Productions, Ltd.

  Providing Unix & Internet Contracting and Consulting,
  QA Testing, Technical Documentation, Systems Design & Implementation,
  General Programming, E-commerce, Web & Mail Services since 1998

Phone:   604-435-1205
Email:   [EMAIL PROTECTED]
Webpage: http://reactor-core.org
Address: 2459 E 41st Ave, Vancouver, BC  V5R2W2

Attachment: msg06978/pgp00000.pgp
Description: PGP signature

Reply via email to