qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Why X grabs for absolute windows?
Date: Thu, 19 Sep 2013 10:51:33 +0200	[thread overview]
Message-ID: <1379580693.19425.14.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <CAJTo0LYcTjfW_o7=8f43WyWAzLp=S6b2zG5fhUz4hYER3XCzpQ@mail.gmail.com>

On Do, 2013-09-19 at 00:18 +0100, Burton, Ross wrote:
> Hi,
> 
> The documentation for qemu's input devices says:
> 
> ‘tablet’
> Pointer device that uses absolute coordinates (like a touchscreen).
> This means qemu is able to report the mouse position without having to
> grab the mouse. Also overrides the PS/2 mouse emulation when
> activated.

Note the "when activated".  When the guest starts talking to the usb
tablet qemu will (a) switch from relative to absolute pointer mode and
(b) start routing mouse events to the tablet instead of the ps/2 pointer
device.

So there is a phase at boot where qemu is in relative pointer mode and
therefore does pointer grabs.  I think those grabs happen only on mouse
clicks or hotkey (ctrl-alt grab/ungrab) though.

You can watch 'info mice' in monitor to see when the switch happens.

> SDL has a rather stupid implementation of SDL_WM_GrabInput.  Grabs can
> and do fail, but SDL decides to infinitely loop until the grab
> succeeds.  If e.g. a screensaver is active when qemu starts up[1] then
> qemu will busy-loop attempting to grab the pointer, potentially for a
> long time and appearing to hang.

Oops, that is stupid and should be fixed.
As always, patches are very welcome.

cheers,
  Gerd

  reply	other threads:[~2013-09-19  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 23:18 [Qemu-devel] Why X grabs for absolute windows? Burton, Ross
2013-09-19  8:51 ` Gerd Hoffmann [this message]
2013-09-19  9:46   ` Burton, Ross
2013-09-19 10:18     ` Gerd Hoffmann
2013-09-19 16:23       ` Paolo Bonzini
2013-09-19 16:30         ` Burton, Ross

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=1379580693.19425.14.camel@nilsson.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ross.burton@intel.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).