Code: Select all
procedure TChromiumCore.SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer);
begin
if Initialized then
Browser.Host.SendMouseWheelEvent(event, deltaX, deltaY);
end;
To solve the problem, need convert the screen coordinates to the client. But I think this problem comes from the cef3 libraries.
Code: Select all
procedure TChromiumCore.SendMouseWheelEvent(const event: PCefMouseEvent; deltaX, deltaY: Integer);
var MousePos: TPoint;
begin
if Initialized then
begin
mousepos.X:=event.x;
mousepos.Y:=event.y;
if screentoclient(browser.Host.WindowHandle,MousePos) then
begin
event.x:=mousepos.X;
event.y:=mousepos.Y;
end;
Browser.Host.SendMouseWheelEvent(event, deltaX, deltaY);
end;
end;