mouse pointer offset with gtk,gl=on When I turn gl=on for -display gtk, some Y offset is added to the mouse pointer coordinates. That is, when I click on an icon, an icon _above_ the one I clicked triggers. Using xev, it seems to be offset of 10-12 pixels. It happens with all ps/2 mouse, -usbdevice mouse and -usbdevice tablet. Without gl=on, the pointer is precise. I have these qemu versions: qemu-2.6.0-470.2.x86_64 qemu-ipxe-1.0.0-470.2.noarch qemu-ksm-2.6.0-470.2.x86_64 qemu-kvm-2.6.0-470.2.x86_64 qemu-ovmf-x86_64-2015+git1462940744.321151f-2.1.noarch qemu-ppc-2.6.0-470.2.x86_64 qemu-seabios-1.9.1-470.2.noarch qemu-sgabios-8-470.2.noarch qemu-tools-2.6.0-470.2.x86_64 qemu-vgabios-1.9.1-470.2.noarch qemu-x86-2.6.0-470.2.x86_64 The same happens with qemu from git, commit a28aae041aa76a779df6467a7fe68b9e8a8b2c0a. This is because height from gdk_drawable_get_size() in gd_motion_event() includes menu or whatever: gl=off: gd_motion_event: fbw= 640 fbh= 480 ww= 640 wh= 480 mx= 0 my= 0 x= 576 y= 3 gl=on: gd_motion_event: fbw= 640 fbh= 480 ww= 640 wh= 506 mx= 0 my= 13 x= 571 y= 471 Yeh I saw this behaviour as well. s->menu_bar's height is really 26px (506-480) both s->notebook's and vc->tab_item's height is 506 px (the same as vc->gfx.drawing_area). I cannot figure out why... Ok, should we use gtk_widget_get_allocated_height and gtk_widget_get_allocated_width instead of gdk_drawable_get_size ? That works for scale = 1. Given scale is set only in draw (2d) and not in render (3d), it never worked with other scales. Apart from that, the code is full of bugs. I could make it work with the attached diff modulo the fprintfs, basically. However I am not going to invest more time into that, as it has to be audited and fixed by someone who actually understands the code. Mouse still doesn't work properly with 2.9.0 and Ubuntu 17.04 guest -smp 2 -enable-kvm -vga virtio -display gtk,gl=on -m 2048 -cdrom ubuntu-17.04-desktop-amd64.iso mouse works better with debug & fix patch seems to be fixed with f1aba960cc40ab65fa88c8678883bd2201708c55 : https://git.qemu.org/?p=qemu.git;a=commit;h=f1aba960cc40ab65fa88c8678883bd2201708c55 anyone else can confirm, i have another issue affecting scaling with my setup. FWIW: Commit f1aba960cc40 has been released with v3.1.0.