* [Qemu-devel] Qemu GTK display mouse pointer visibility/position problem
@ 2019-02-20 8:31 Michael Tokarev
2019-02-21 14:18 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Michael Tokarev @ 2019-02-20 8:31 UTC (permalink / raw)
To: qemu-devel qemu-devel; +Cc: Gerd Hoffmann
Forwarding from Debian bug report #919057,
http://bugs.debian.org/919057
Apparently there's some prob with qemu 3.1 GTK frontend and mouse pointer
visibility. Especially this part:
----
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.
Note that the mouse otherwise behaves normally, i.e. with -device
usb-tablet it is where the X11 pointer is, and it is "fully usable" in the
guest, if you ignore the fact that you have to work blind :)
This happens regardless of -device usb-tablet.
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).
Basically, it seems that the gtk+ interface simply doesn't show the
hardware pointer when input is grabbed, for whatever reason.
Interestingly enough, when I change the shape of the pointer under both
ubuntu and windows 10 guests, the shape is reflected by qemu (as long
as input isn't grabbed, orf course), so the gtk interface is able to
corretcly access the hardware pointer graphics form the guest.
Googling around, I saw recommendations to use -show-cursor - I have no
clue what it does, it didn't have any effect, either.
----
Thanks,
/mjt
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Qemu GTK display mouse pointer visibility/position problem
2019-02-20 8:31 [Qemu-devel] Qemu GTK display mouse pointer visibility/position problem Michael Tokarev
@ 2019-02-21 14:18 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2019-02-21 14:18 UTC (permalink / raw)
To: qemu-devel qemu-devel, 919057
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-21 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 8:31 [Qemu-devel] Qemu GTK display mouse pointer visibility/position problem Michael Tokarev
2019-02-21 14:18 ` Gerd Hoffmann
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).