cocoa: get rid of cocoa mouse events supression. fix #33177

git-svn-id: trunk@58540 -
This commit is contained in:
dmitry 2018-07-16 03:16:59 +00:00
parent acedd9f432
commit fefbc9e7cc
2 changed files with 5 additions and 29 deletions

View File

@ -116,15 +116,6 @@ type
class procedure Invalidate(const AWinControl: TWinControl); override;
end;
{ TLCLCustomControlCallback }
TLCLCustomControlCallback = class(TLCLCommonCallback)
public
function MouseMove(Event: NSEvent): Boolean; override;
function MouseUpDownEvent(Event: NSEvent; AForceAsMouseUp: Boolean = False): Boolean; override;
end;
{ TCocoaWSCustomControl }
TCocoaWSCustomControl = class(TWSCustomControl)
@ -187,21 +178,6 @@ begin
SetViewDefaults(Result);
end;
{ TLCLCustomControlCallback }
function TLCLCustomControlCallback.MouseMove(Event: NSEvent): Boolean;
begin
inherited MouseMove(Event);
Result:=True;
end;
function TLCLCustomControlCallback.MouseUpDownEvent(Event: NSEvent; AForceAsMouseUp: Boolean = False): Boolean;
begin
inherited MouseUpDownEvent(Event, AForceAsMouseUp);
Result := True;
end;
{ TLCLCommonCallback }
function TLCLCommonCallback.GetHasCaret: Boolean;
@ -1693,10 +1669,10 @@ class function TCocoaWSCustomControl.CreateHandle(const AWinControl: TWinControl
var
ctrl : TCocoaCustomControl;
sl : TCocoaManualScrollView;
lcl : TLCLCustomControlCallback;
lcl : TLCLCommonCallback;
begin
ctrl := TCocoaCustomControl(TCocoaCustomControl.alloc.lclInitWithCreateParams(AParams));
lcl := TLCLCustomControlCallback.Create(ctrl, AWinControl);
lcl := TLCLCommonCallback.Create(ctrl, AWinControl);
ctrl.callback := lcl;
sl := EmbedInManualScrollView(ctrl);

View File

@ -368,7 +368,7 @@ class function TCocoaWSScrollingWinControl.CreateHandle(const AWinControl: TWin
var
scrollcon: TCocoaScrollView;
docview: TCocoaCustomControl;
lcl: TLCLCustomControlCallback;
lcl : TLCLCommonCallback;
begin
docview := TCocoaCustomControl.alloc.lclInitWithCreateParams(AParams);
scrollcon:=EmbedInScrollView(docView);
@ -378,7 +378,7 @@ begin
scrollcon.setHasVerticalScroller(True);
scrollcon.isCustomRange := true;
lcl := TLCLCustomControlCallback.Create(docview, AWinControl);
lcl := TLCLCommonCallback.Create(docview, AWinControl);
docview.callback := lcl;
docview.setAutoresizingMask(NSViewWidthSizable or NSViewHeightSizable);
scrollcon.callback := lcl;
@ -548,7 +548,7 @@ begin
end
else
begin
cnt.callback := TLCLCustomControlCallback.Create(cnt, AWinControl);
cnt.callback := TLCLCommonCallback.Create(cnt, AWinControl);
if AParams.WndParent <> 0 then
begin
lDestView := GetNSObjectView(NSObject(AParams.WndParent));