From: Gerd Hoffmann <kraxel@redhat.com>
To: "Andreas Färber" <afaerber@suse.de>
Cc: "Bernhard M. Wiedemann" <bwiedemann@suse.de>,
xen-devel <xen-devel@lists.xensource.com>,
Stephan Kulow <coolo@suse.de>, Brad Hards <bradh@frogmouth.net>,
Peter Maydell <peter.maydell@linaro.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>,
Blue Swirl <blauwirbel@gmail.com>, Alexander Graf <agraf@suse.de>,
qemu-ppc <qemu-ppc@nongnu.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Ludwig Nussel <lnussel@suse.de>
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 [thread overview]
Message-ID: <51BEB7DD.5040800@redhat.com> (raw)
In-Reply-To: <1371354005-26873-1-git-send-email-afaerber@suse.de>
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
prev parent reply other threads:[~2013-06-17 7:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-16 3:39 [Qemu-devel] [PATCH RFC 0/8] monitor: Fix mouse_button and improve mouse_move commands Andreas Färber
2013-06-16 3:39 ` [Qemu-devel] [PATCH RFC 1/8] ui/input: Clean up QEMUPutMouseEntry struct Andreas Färber
2013-06-17 7:17 ` Gerd Hoffmann
2013-06-16 3:39 ` [Qemu-devel] [PATCH RFC 2/8] ui/input: Simplify kbd_mouse_event() Andreas Färber
2013-06-17 7:17 ` Gerd Hoffmann
2013-06-16 3:40 ` [Qemu-devel] [PATCH RFC 3/8] ui/input: Use bool for qemu_add_mouse_event_handler() Andreas Färber
2013-06-16 3:40 ` [Qemu-devel] [PATCH RFC 4/8] ui/input: Introduce MouseOps " Andreas Färber
2013-06-17 7:20 ` Gerd Hoffmann
2013-06-16 3:40 ` [Qemu-devel] [PATCH RFC 5/8] ui/input: Introduce MouseOps::get_buttons_state() Andreas Färber
2013-06-16 3:40 ` [Qemu-devel] [PATCH RFC 6/8] monitor: Eliminate global mouse buttons state for mouse_move Andreas Färber
2013-06-16 3:40 ` [Qemu-devel] [PATCH RFC 7/8] ui/input: Introduce MouseOps::get_position() Andreas Färber
2013-06-16 3:40 ` [Qemu-devel] [PATCH RFC 8/8] monitor: Fix mouse_button command for absolute coordinates Andreas Färber
2013-06-17 7:16 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51BEB7DD.5040800@redhat.com \
--to=kraxel@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=blauwirbel@gmail.com \
--cc=bradh@frogmouth.net \
--cc=bwiedemann@suse.de \
--cc=coolo@suse.de \
--cc=lcapitulino@redhat.com \
--cc=lnussel@suse.de \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).