[haiku-development] Re: Joysticks in Haiku

  • From: Stephan Aßmus <superstippi@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 11 Mar 2011 16:45:52 +0100

Hi again,

Am 11.03.2011 16:20, schrieb François Revol:
Le 11 mars 2011 à 16:03, Stephan Aßmus a écrit :
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.

And why not cache both pieces of information in the driver and provide the cached value when it would otherwise not be available?

Best regards,
-Stephan


Other related posts: