Hi !
> 1. Why GII gii_event.pbutton does not have cursor coordinate information
Because the buttons and the pointer position are not related in any way
theoretically. Using the mapper filters, you can push "mouse buttons" on
the keyboard and vice versa ...
> in case of GII buffering and sending data which have absolute cursor
> position (x target and may be future fb target with hardware cursor).
? I don't get you here. What has absoluet cursor position to do with buttons ?
> 2. Why GII does not use button data in case of sending pmove event?
Same reason, see above.
> 3. I found some strange behavior inside of GII.
> -I poll GII one time
> -I read all events queued inside GII in my internal buffer with keeping
> only one pmove message inside of my buffer
> -I read one message from my buffer.
> -I move my cursor in case of pmove data
> -I call ggUSleep(10);
> -I see funny effect on the screen:
> my cursor making always is to late :) It looks like GII buffer can not
> give me back all messages by one polling.
>
> if I do poll and read queued messages like this:
>
> while(Poll()); instead of one polling
> where Poll is something like this [... snip ...]
> I've found no problem with my cursor.
Hmm - I get you right, that gii events are kept queued inside gii when you
try to read them - right ?
Well, there is a possible simple explanation:
ggiPoll unblocks _as_soon_as_ one of the associated FDs gets readable. Now,
if the Mouse e.g. first sends a Pointer-update-packet or similar, this gets
read into LibGGI immediately during the poll. The poll then unblocks, as data
is available. At that point, there is only the first sent event from the
mouse available. The mouse keeps sending data, but the LibGII poll routine
has already terminated, as it terminates as soon as the first event gets
readable.
For such situations, where this behaviour is undesireable, as there are long
delays between frames, it might make sense to use something like
while(ggiPoll()) {
do_the_evenht_reading();
eventually_wait_a_short_grace_time();
}
This allows for "slow" devices that do not instantaneously deliver all data.
What mouse do you have ? we might want to check the driver, if it does the
expected thing, which is to loop in its poll handler as long as data is
incoming.
CU, Andy
--
Andreas Beck | Email : <[EMAIL PROTECTED]>