Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

FMX / Mouse wheel event isn't working when application is ran on secondary screen #29

Closed
stephanewierzbicki opened this issue Jun 10, 2016 · 0 comments

Comments

@stephanewierzbicki
Copy link

stephanewierzbicki commented Jun 10, 2016

Hello,

TChromiumFMX doesn't react to mouse wheel when application is ran on secondary screen.

Edit ceffmx.pas and modify remplace AbsoluteToLocal with ScreenToLocal

procedure TCustomChromiumFMX.MouseWheel(Shift: TShiftState; WheelDelta: Integer;
  var Handled: Boolean);
var
  event: TCefMouseEvent;
begin
  if (FMouseWheelService <> nil) AND (Browser <> nil) then
  begin
      with  ScreenToLocal(FMouseWheelService.GetMousePos()).Round do
      begin
        event.x := X;
        event.y := Y;
        event.modifiers := getModifiers(Shift);
        Browser.Host.SendMouseWheelEvent(@event, 0, WheelDelta);
      end;
  end;
hgourvest added a commit that referenced this issue Jun 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant