[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 0/8] monitor: Fix mouse_button and improve mouse_move commands



  Hi,

> My solution is to obtain position and buttons state from where the VMState is:
> I clean up the mouse event handler registration code a bit and extend it:
> * one mandatory callback to obtain mouse button state and
> * one optional callback to obtain absolute position state from backends.

Hmm, querying state from the mouse drivers just to be able to pass it
back in is a bit backwards.

I'd rather go fix the event reporting interface.  Instead of having
*one* callback with *all* parameters I think we should have a callback
per parameter, or maybe better a parameter type enum.  i.e. instead of:

  mouse_event(x, y, z, button_state)

We'll have

  mouse_event(type, value)

Then we'll report moves this way:

  mouse_event(REL_X, 23);     // or ABS_X for the tablet.
  mouse_event(REL_Y, 42);
  mouse_event(SYNC, 0);       // <<= means "done, flush events to guest"

And klicks this way:

  mouse_event(DOWN, BTN_LEFT);
  mouse_event(SYNC);

  mouse_event(UP, BTN_LEFT);
  mouse_event(SYNC);

The linux input layer works in a simliar way.

cheers,
  Gerd




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.