From: Brad Hards <bradh@frogmouth.net>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] monitor: avoid moving cursor during "mouse_button" command
Date: Sat, 30 Apr 2011 10:09:37 +1000 [thread overview]
Message-ID: <201104301009.37314.bradh@frogmouth.net> (raw)
In-Reply-To: <4DB94581.5080407@redhat.com>
On Thursday 28 April 2011 20:46:25 Gerd Hoffmann wrote:
> I think it would be much better to keep track of the mouse position (and
> button state while being at it) in input.c instead of monitor.c.
>
> Once this is in place it should be easy to add kbd_mouse_* functions
> which update position or buttons only, which the monitor code can use
> then to avoid the unwanted pointer warp.
This turns out to be a bit more difficult than we discussed.
The new functions work well for the monitor code side (not unexpected, since
its essentially the same as the original code I proposed for monitor-only
changes).
The problem is that almost all input code (in absolute mode) keeps track of
the position itself - monitor was the exception.
So a sequence like the following:
1. Move cursor in SDL
2. Use mouse_move in monitor
3. Use mouse_button 2 in monitor
4. Click mouse in SDL
works ok up to step 3, but step 4 causes the pointer to warp back to where it
was at the end of step 1.
So it looks like we'd have to modify all callers of kbd_mouse_event(), and the
code paths are already a bit convoluted. As discussed on IRC, I'm a bit
concerned about testing cocoa and spice.
Thoughts?
Brad
next prev parent reply other threads:[~2011-04-30 0:09 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 [this message]
2011-05-02 6:57 ` Gerd Hoffmann
2011-04-09 0:21 ` Brad Hards
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=201104301009.37314.bradh@frogmouth.net \
--to=bradh@frogmouth.net \
--cc=kraxel@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 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).