[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 0/8] monitor: Fix mouse_button and improve m
From: |
Gerd Hoffmann |
Subject: |
Re: [Qemu-devel] [PATCH RFC 0/8] monitor: Fix mouse_button and improve mouse_move commands |
Date: |
Mon, 17 Jun 2013 09:16:45 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130513 Thunderbird/17.0.6 |
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
- Re: [Qemu-devel] [PATCH RFC 2/8] ui/input: Simplify kbd_mouse_event(), (continued)
- [Qemu-devel] [PATCH RFC 1/8] ui/input: Clean up QEMUPutMouseEntry struct, Andreas Färber, 2013/06/15
- [Qemu-devel] [PATCH RFC 3/8] ui/input: Use bool for qemu_add_mouse_event_handler(), Andreas Färber, 2013/06/15
- [Qemu-devel] [PATCH RFC 4/8] ui/input: Introduce MouseOps for qemu_add_mouse_event_handler(), Andreas Färber, 2013/06/15
- [Qemu-devel] [PATCH RFC 6/8] monitor: Eliminate global mouse buttons state for mouse_move, Andreas Färber, 2013/06/15
- [Qemu-devel] [PATCH RFC 8/8] monitor: Fix mouse_button command for absolute coordinates, Andreas Färber, 2013/06/15
- [Qemu-devel] [PATCH RFC 5/8] ui/input: Introduce MouseOps::get_buttons_state(), Andreas Färber, 2013/06/15
- [Qemu-devel] [PATCH RFC 7/8] ui/input: Introduce MouseOps::get_position(), Andreas Färber, 2013/06/15
- Re: [Qemu-devel] [PATCH RFC 0/8] monitor: Fix mouse_button and improve mouse_move commands,
Gerd Hoffmann <=