[haiku] Re: VMW tools as (optional) package
- From: Stephan Assmus <superstippi@xxxxxx>
- To: haiku@xxxxxxxxxxxxx
- Date: Sun, 01 Feb 2009 21:47:40 +0100
Vincent DUVERT <vincent.duvert@xxxxxxx> wrote:
> 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....
Filtering out the non-vmware mouse moved events in an additional filter
does sound like a clean solution to me. The input_server is being made
aware of resolution changes AFAIR, maybe it could be extended to forward
this info to add-ons, but perhaps there is already a mechanism existing. I
seem to have a faint recollection of that.
Best regards,
-Stephan
Other related posts: