[haiku-development] Re: Joysticks in Haiku

  • From: François Revol <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 11 Mar 2011 16:20:16 +0100

Le 11 mars 2011 à 16:03, Stephan Aßmus a écrit :

> Hi,
> 
> Am 11.03.2011 15:18, schrieb François Revol:
>> Btw, I had an issue when writing the VirtualBox mouse input_server add-on.
>> Because virtualbox only passes absolute coordinates to it, I'm only able to 
>> send B_MOUSE_MOVED messages without the buttons field. Some apps like 
>> Tracker don't really like this and fail to handle selections or drags 
>> because it doesn't see the buttons as being pressed.
> 
> This sounds really strange. Why would you be unable to send button state in 
> each message? What does it have to do with coordinates?

It's just that VBox sends all button events through the PS/2 port as regular 
mouse events, and only the absolute position is available through their fake 
PCI device. So input_server gets a mixture of B_MOUSE_DOWN|UP with relative 
move of 0,0 and B_MOUSE_MOVED with the absolute positions but no button data.
Oddly app_server doesn't have problem with this when moving windows around, but 
Tracker can't start a selection or drag. Also releasing the mouse in a menu 
doesn't invoke it either.

VMware likely does the same which is why the vmware addon is implemented as a 
filter that adds absolute position to passing messages and caches buttons, and 
not a device. I went for a device naively and also to allow someone to disable 
it with iroster if needed, but I will have to also add a filter I suppose.

François.

Other related posts: