qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Why X grabs for absolute windows?
@ 2013-09-18 23:18 Burton, Ross
  2013-09-19  8:51 ` Gerd Hoffmann
  0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2013-09-18 23:18 UTC (permalink / raw)
  To: qemu-devel

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.

However, qemu does do X pointer grabs when the pointer enters the
virtual display, but it rather cunningly detects the pointer reaching
the border of the display and ungrabs so there doesn't appear to be a
grab.  However, there's a "but".

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.

My understanding of X events has faded somewhat over the years but I
can't see why qemu needs to grab the pointer for absolute input
devices, and commenting out the grabs doesn't cause catastrophic
failures.  Is there a good reason why qemu grabs the pointer so much,
or can some/all of the grabs be removed?

Thanks,
Ross

[1] Our use-case is an automated test suite that runs inside qemu,
which is connected to a virtual X server that we can connect to if we
ever need to watch the test suite execute. Generally nobody is
connected, so there's no input, so the screensaver activates.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-19 16:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 23:18 [Qemu-devel] Why X grabs for absolute windows? Burton, Ross
2013-09-19  8:51 ` Gerd Hoffmann
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

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).