]> 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)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 30 May 2025 10:52:01 +0000 (13:52 +0300)
commit613f05a4c653761550b1d5a5ff8993d1f8e22230
treef7b29d00bfce2634a09dd18dee36e26abec22ad1
parenta5a805068a2ca0dabf71f05c56bdbdba7360f985
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>
(cherry picked from commit 30aa105640b0a2a541744b6584d57c9a4b86debd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
ui/sdl2.c