qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Qemu GTK display mouse pointer visibility/position prob


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] Qemu GTK display mouse pointer visibility/position problem
Date: Thu, 21 Feb 2019 15:18:41 +0100
User-agent: NeoMutt/20180716

  Hi,

> I have similar problems as the original reporter, specifically, after
> upgrading to qemu 3.1 from stretch [from qemu 2.8 -- mjt], mouse pointer
> is invisible in guest systems iff the pointer is grabbed,
> with -display gtk and qxl is used.

> When using -vga std, both linux and windows guests show a mouse pointer.
> likewise, with -vga qxl and/or additional -device qxl, a mouse pointer is
> shown *iff* the input isn't grabbed.
> 
> The behaviour is perfectly repeatable here: if I press ctrl-alt-g, mouse
> pointer becomes invisible, ctrl-alt-g again, pointer becomes visible
> again.

Why do you grab in the first place?

> I have tried this with both ubuntu 17.10 and windows 10 + qxl-dod driver
> (virtio 0.141 and 0.164), and the behaviour is consistent, so I think
> this is a bug in the gtk+ interface of qemu when qxl is used (or when a
> hardware pointer is used, as I guess -vga std does not emulate a hardware
> pointer).

Yes, -vga std has no hardware cursor support.

qxl has two modes: "server mouse mode" where the guest/spice-server
renders the cursor (effectively software cursor), and "client mouse
mode" where the spice-client renders the cursor (effectively hardware
cursor, typically done by setting the window cursor to the guest
cursor).

"client mouse mode" is used in case a absolute pointing device is
present, "server mouse mode" otherwise.

Likewise qemu UIs (both gtk and sdl) do not grab the pointer in case a
absolute pointing device is present, otherwise they do automatically
grab the pointer on mouse clicks.

So typically you run either in server mouse mode with grab or client
mouse mode without grab.  The gtk ui has some logic to handle that,
specifically it hides the cursor in some cases to avoid that you see
both software and hardware cursor.  When manually activating the grab
you are confusing that logic ...

> Googling around, I saw recommendations to use -show-cursor - I have no
> clue what it does, it didn't have any effect, either.

Try "-display gtk,grab-on-hover=on"?

That'll activate the *keyboard* grab in case the mouse pointer is within
the qemu window, so hotkeys go to the guest instead of being captured by
the hosts window manager.  Then you don't have to manually activate the
grab via Ctrl-Alt-G (which grabs both keyboard and pointer) for that.

HTH,
  Gerd




reply via email to

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