From: Brad Hards <bradh@frogmouth.net>
To: qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH] monitor: avoid moving cursor during "mouse_button" command
Date: Sat, 9 Apr 2011 10:21:04 +1000 [thread overview]
Message-ID: <201104091021.04932.bradh@frogmouth.net> (raw)
In-Reply-To: <m3bp0ghkwi.fsf@blackfin.pond.sub.org>
On Sat, 9 Apr 2011 12:34:21 am Markus Armbruster wrote:
> There's one instance of state: position (if absolute) + buttons for any
> number of mice. Funny things can happen when you have more than one
> mouse and switch between them.
For the common case (in most OS), each of the mice are mixed together.
Switching (with the guest powered up) is pretty rare.
> Even if there's just one mouse: the state is updated only for monitor
> mouse action. Funny things can happen when something other than monitor
> commands uses the mouse.
That already happens. If SDL and monitor mouse_move are both used, then "last
wins".
> Shouldn't the state be kept per-mouse? Monitor could ask for current
> coordinates + button state then.
I thought about keeping the state in input.c code, but that adds more
complexity and probably won't work properly either (as Anthony pointed out on
IRC), because the inputs that you've provided to the guest get modified by
guest code (like mouse acceleration).
> Note buttons are already funny. The patch just extends the funniness to
> position. Could be a valid excuse for committing it as is.
Note that the diff doesn't change the behaviour of mouse_move (i.e. position).
It just "breaks less" for the mouse_button command for the following specific
situation:
1. You've previously used mouse_move to select the point you want
and
2. You're using an absolute pointing device.
Going back to the original bug report, with current trunk (and the common case
of an absolute pointing device), mouse_button warps the mouse to the origin if
you press a button. It seems less surprising to use the last position.
Brad
prev parent reply other threads:[~2011-04-09 0:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 7:44 [Qemu-devel] [PATCH] monitor: avoid moving cursor during "mouse_button" command Brad Hards
2011-04-08 9:07 ` Brad Hards
2011-04-08 14:34 ` Markus Armbruster
2011-04-08 16:37 ` Luiz Capitulino
2011-04-28 10:46 ` Gerd Hoffmann
2011-04-30 0:09 ` Brad Hards
2011-05-02 6:57 ` Gerd Hoffmann
2011-04-09 0:21 ` Brad Hards [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=201104091021.04932.bradh@frogmouth.net \
--to=bradh@frogmouth.net \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.