]> git.proxmox.com Git - mirror_qemu.git/commit
ui/gtk: Fix relative mouse with multiple monitors
authorDennis Wölfing <denniswoelfing@gmx.de>
Tue, 20 Jul 2021 14:39:41 +0000 (16:39 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 26 Jul 2021 08:24:49 +0000 (10:24 +0200)
commitcd6c768f6a4f65a65bd44bdec0638b7fd861ceb1
tree9b8d8b41e085b2c09fb5ea05fb7a802b302761b5
parenta2376507f615495b1d16685449ce0ea78c2caf9d
ui/gtk: Fix relative mouse with multiple monitors

To handle relative mouse input the event handler needs to move the mouse
away from the screen edges. Failing to do so results in the mouse
getting stuck at invisible walls. However the current implementation for
this is broken on hosts with multiple monitors.

With multiple monitors the mouse can be located outside of the current
monitor which is not handled by the current code. Also the monitor
itself might be located at coordinates different from (0, 0).

Signed-off-by: Dennis Wölfing <denniswoelfing@gmx.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210720143940.291413-1-denniswoelfing@gmx.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/gtk.c