]> git.ipfire.org Git - thirdparty/qemu.git/commit
ui/sdl: Consider scaling in mouse event handling
authorWeifeng Liu <weifeng.liu@intel.com>
Sun, 11 May 2025 07:33:15 +0000 (15:33 +0800)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 24 May 2025 15:03:31 +0000 (17:03 +0200)
commit30aa105640b0a2a541744b6584d57c9a4b86debd
tree7dd4c76e6cd568c6b25c225f3dd632cfb79be66d
parent8fb072472c38cb1778c5b0bebf535a8b13533857
ui/sdl: Consider scaling in mouse event handling

When using sdl display backend, if the window is scaled, incorrect mouse
positions will be reported since scaling is not properly handled. Fix it
by transforming the positions from window coordinate to guest buffer
coordinate.

Signed-off-by: Weifeng Liu <weifeng.liu@intel.com>
Message-ID: <20250511073337.876650-6-weifeng.liu.z@gmail.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
ui/sdl2.c