[haiku] Re: VMW tools as (optional) package

  • From: Vincent DUVERT <vincent.duvert@xxxxxxx>
  • To: haiku@xxxxxxxxxxxxx
  • Date: Sun, 1 Feb 2009 21:38:23 +0100

Le 26 janv. 09 à 15:18, holmqvist.fredrik@xxxxxxxxxxxx a écrit :
They are quite simple. Just look at the source. I think the wmvare mouse driver would benefit from using absolute
coords instead of relative.
They are currently in floating point 0 to 1.
I started creating an input_server add-on for the vmware mouse (using the "tablet" and "serial_mouse" add-ons as examples), I made it working but there are still issues : - Like you said, coordinates are floating numbers from 0 to 1, and unfortunately the VMW backdoor returns the coordinates in pixel.
So for now I just use :
float x = cursor_x;
float y = cursor_y;
x /= 1024.0;
y /= 768.0;
which is only working if the screen resolution is 1024x768, of course. I suppose I could get the current resolution and detect resolution changes, but support for absolute coordinates would probably be better. - Haiku is receiving data from the (virtual) PS2 or USB mouse and the VMW mouse at the same time, so the cursors flashes (and dragging does not work very well). Disabling the "mouse" add-on is not an option, since the buttons status is not sent by VMWare... I guess that I could write an input_server filter to make it ignore the "mouse moved" events from the USB mouse, but this is going complicated... Perhaps a better option could be to directly patch the "mouse" add-on, making it send absolute coordinates when it is running in VMWare and the mouse is moved. It would also avoid polling the VMW backdoor constantly. I will take a look....


Other related posts: