qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Why X grabs for absolute windows?


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Why X grabs for absolute windows?
Date: Thu, 19 Sep 2013 10:51:33 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]