With -display gtk,gl=on, the position of mouse does not show correctly
<!-- This is the upstream QEMU issue tracker. If you are able to, it will greatly facilitate bug triage if you attempt to reproduce the problem with the latest qemu.git master built from source. See https://www.qemu.org/download/#source for instructions on how to do this. QEMU generally supports the last two releases advertised on https://www.qemu.org/. Problems with distro-packaged versions of QEMU older than this should be reported to the distribution instead. See https://www.qemu.org/contribute/report-a-bug/ for additional guidance. If this is a security issue, please consult https://www.qemu.org/contribute/security-process/ --> ## Host environment - Operating system: Ubuntu 20.04 - OS/kernel version: 5.4.0-91-generic - Architecture: x86 64-bit - QEMU flavor: qemu-system-x86_64 - QEMU version: 6.2.92 - QEMU command line: <!-- Give the smallest, complete command line that exhibits the problem. If you are using libvirt, virsh, or vmm, you can likely find the QEMU command line arguments in /var/log/libvirt/qemu/$GUEST.log. --> ``` $HOME/.bin/bin/qemu-system-x86_64 ubuntu-desktop.qcow2 -m 2G -smp 2 -enable-kvm -vga virtio -display gtk,gl=on ``` ## Emulated/Virtualized environment - Operating system: Ubuntu 20.04 - OS/kernel version: 5.11.0-41-generic - Architecture: x86 64 bit ## Description of problem <!-- Describe the problem, including any error/crash messages seen. --> With `-display gtk,gl=on`, the cursor of the mouse does not show correctly. So, it's very hard to use mouse on guest OS desktop to, say, open an application or to close it. The displayed mouse cursor is about 300x300 away from the actual mouse position. ## Steps to reproduce 1. Build qemu 6.2.0-rc2 using the following `./configure` options: ``` --prefix=$HOME/.bin --target-list=x86_64-softmmu --enable-kvm --enable-vnc --enable-gtk --enable-vte --enable-xkbcommon --enable-sdl --enable-spice --enable-spice-protocol --enable-virglrenderer --enable-opengl --enable-guest-agent --enable-avx2 --enable-hax --enable-system --enable-linux-user --enable-libssh --enable-linux-aio --enable-linux-io-uring --enable-modules --enable-fuse --enable-fuse-lseek ``` 2. Run the above QEMU command with `-display gtk,gl=on`. 3. Try to open an application by clicking its icon on desktop and to close it by clicking the "X" icon. ## Additional information <!-- Attach logs, stack traces, screenshots, etc. Compress the files if necessary. If using libvirt, libvirt logs and XML domain information may be relevant. --> <!-- The line below ensures that proper tags are added to the issue. Please do not remove it. -->
issue