Thursday, May 28, 2009

The mouse cursor issue

I did the mouse cursor support for X86 platforms. As matter fact, the same change should be able to run anyway.

But when I try to drag the screen to switch to next screen, I see the screen keeps flicking. It looks like a bug. In order to debug this problem, I wrote a small application to just draw lines on the screen. When I start to draw, I can see the lines keep jumping back to position 0,0 during the mouse cursor movement . It seems that the mouse cursor keeps sending out wrong mouse position.
After some debugging, I found out that it is cause by the batching mode of mouse event. Current mouse cursor tries to simulate the touch events, in order to do that, I have to convert the rel_x/y to abs_x/y and this conversion was never done for batched events. Because of this, both rel_x/y and abs_x/y are sent with touch events.
I have published the patch to
http://code.google.com/p/patch-hosting-for-android-x86-support/downloads/list

1 comment:

  1. can u provide the code for showing mouse cursor in the application

    ReplyDelete