Mark Vojkovich wrote:
> On Thu, 14 Mar 2002, Michael Toomim wrote:
>
>
>>Mark Vojkovich wrote:
>>
>>> Because the people who care about this don't appear to care enough
>>>about this to fix it. They only care enough about it to complain about
>>>it. Send the patches in when you're finished with the support for it.
>>>
>>So I see. I was thinking that an easy way to do it (since I *barely*
>>care enough to do something to fix it) would be to run a user-level
>>program that tracks the cursor movement and then actively adjusts the
>>cursor position every n milliseconds in order to make it appear properly
>>accelerated. It would be a sort of mouse cursor "afterburner".
>>
>>This way I wouldn't have to re-compile X from the sources, and the
>>program could be easily and non-invasively distributed.
>
> I don't think something like that is possible. The X-server
> reads right from the device so I don't see a place to slice into.
> You could probably do something in the kernel though.
Not *mouse* movement, *cursor* movement. I don't want to do anything as
low-level as that.
I want to read the current position of the cursor on the screen,
subtract it from the last known position of the cursor on the screen,
and then set the position of the cursor on the screen to a new position,
that will take a user-defined amount of acceleration into account.
My plan is to require the X server's native acceleration to be turned
off. The X server will then read the mouse device's movement as it
usually does, update the display for the new cursor position as it
usually does (except that it will be to an unaccelerated value), and
then my program will kick in, read the new display position and move the
cursor a little bit more to make it appear accelerated. This is why I
called it an "afterburner".
My hypothesis is that this disgusting hack will be surprisingly usable.
I think I can do it without taking up too much CPU power, while still
slicing in to catch all the mouse movements without noticable hickups
and that the user won't be able to discern any cursor "jumping" effects
(since the mouse gets accelerated *after* the X server displays it for
the first time). We'll see if this hypothesis turns out to be true or
not, but I think that it will be.
So, when I said I need help finding API calls, I meant that I have no
idea about how to program with X at all. How would I go about finding
API calls to do the things I need? I want to be able to get the current
position of the cursor on the screen, and to set the screen-position of
the cursor. Additionally, it would be great if X had some way of
calling one of my functions whenever the cursor moves, so that I don't
have poll the onscreen position in an imprecise manner.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert