summary refs log tree commit diff stats
path: root/hw/core/qdev.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-23 10:35:24 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-29 22:00:33 +0100
commitf61c387ea627079b33a635f5d203a2c2bccc86c6 (patch)
tree55bc325aca861e975c9e8bbe30abefc30d422700 /hw/core/qdev.c
parent5dd45bee5816ef1e941fdf1122943e4ab345f388 (diff)
downloadfocaccia-qemu-f61c387ea627079b33a635f5d203a2c2bccc86c6.tar.gz
focaccia-qemu-f61c387ea627079b33a635f5d203a2c2bccc86c6.zip
ui/cocoa: Fix handling of absolute positioning devices
Fix handling of absolute positioning devices, which were basically
unusable for two separate reasons:
 (1) as soon as you pressed the left mouse button we would call
     CGAssociateMouseAndMouseCursorPosition(FALSE), which means that
     the absolute coordinates of the mouse events are never updated
 (2) we didn't account for MacOSX coordinate origin being bottom left
     rather than top right, and so all the Y values sent to the guest
     were inverted

We fix (1) by aligning our behaviour with the SDL UI backend for
absolute devices:
 * when the mouse moves into the window we do a grab (which means
   hiding the host cursor and sending special keys to the guest)
 * when the mouse moves out of the window we un-grab
and fix (2) by doing the correct transformation in the call to
qemu_input_queue_abs().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1403516125-14568-4-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/core/qdev.c')
0 files changed, 0 insertions, 0 deletions