1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-11-23 21:34:53 +02:00

Fixed incorrect coordinates using the wheel button in OSR demos for Windows (VCL).

This commit is contained in:
Salvador Diaz Fau
2021-01-29 18:27:10 +01:00
parent e3fdfe8a45
commit cd46aa097d
11 changed files with 126 additions and 56 deletions

View File

@@ -952,7 +952,11 @@ begin
TempEvent.y := MousePos.y;
TempEvent.modifiers := getModifiers(Shift);
DeviceToLogical(TempEvent, GlobalCEFApp.DeviceScaleFactor);
chrmosr.SendMouseWheelEvent(@TempEvent, 0, WheelDelta);
if CefIsKeyDown(VK_SHIFT) then
chrmosr.SendMouseWheelEvent(@TempEvent, WheelDelta, 0)
else
chrmosr.SendMouseWheelEvent(@TempEvent, 0, WheelDelta);
end;
end;