fix(win32 gui): translate mouse wheel events from screen to window coordinates

This commit is contained in:
CJ van den Berg 2025-01-20 19:55:18 +01:00
parent 91eba39019
commit 4842002136
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -699,7 +699,8 @@ fn sendMouseWheel(
) void {
const frame = tracy.initZone(@src(), .{ .name = "gui sendMouseWheel" });
defer frame.deinit();
const point = win32ext.pointFromLparam(lparam);
var point = win32ext.pointFromLparam(lparam);
_ = win32.ScreenToClient(hwnd, &point);
const state = stateFromHwnd(hwnd);
const dpi = win32.dpiFromHwnd(hwnd);
const cell_size = getFont(dpi, getFontSize(), getFontFace()).getCellSize(i32);