mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 18:00:26 +02:00
cocoa: remove AForceObject and determine the flag value based on the mouse event type
git-svn-id: trunk@58850 -
This commit is contained in:
parent
80d14feaba
commit
7ad949d64d
@ -389,9 +389,7 @@ begin
|
||||
and isMouseMoveEvent(Result.type_)
|
||||
then begin
|
||||
cb := TrackedControl.lclGetCallback;
|
||||
if Assigned(cb) then
|
||||
// making sure that the only the same control is called
|
||||
cb.MouseMove(Result, true);
|
||||
if Assigned(cb) then cb.MouseMove(Result);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -49,7 +49,7 @@ type
|
||||
// mouse events
|
||||
function MouseUpDownEvent(Event: NSEvent; AForceAsMouseUp: Boolean = False; AOverrideBlock: Boolean = False): Boolean;
|
||||
procedure MouseClick;
|
||||
function MouseMove(Event: NSEvent; AForceObject: Boolean = False): Boolean;
|
||||
function MouseMove(Event: NSEvent): Boolean;
|
||||
function KeyEvent(Event: NSEvent; AForceAsKeyDown: Boolean = False): Boolean;
|
||||
|
||||
procedure KeyEvPrepare(Event: NSEvent; AForceAsKeyDown: Boolean = False);
|
||||
|
@ -73,7 +73,7 @@ type
|
||||
procedure KeyEvAfter;
|
||||
|
||||
procedure MouseClick; virtual;
|
||||
function MouseMove(Event: NSEvent; AForceObject: Boolean): Boolean; virtual;
|
||||
function MouseMove(Event: NSEvent): Boolean; virtual;
|
||||
function scrollWheel(Event: NSEvent): Boolean; virtual;
|
||||
procedure frameDidChange(sender: id); virtual;
|
||||
procedure boundsDidChange(sender: id); virtual;
|
||||
@ -1231,7 +1231,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TLCLCommonCallback.MouseMove(Event: NSEvent; AForceObject: Boolean): Boolean;
|
||||
function TLCLCommonCallback.MouseMove(Event: NSEvent): Boolean;
|
||||
var
|
||||
Msg: TLMMouseMove;
|
||||
MousePos: NSPoint;
|
||||
@ -1243,6 +1243,7 @@ var
|
||||
targetControl: TWinControl;
|
||||
childControl:TWinControl;
|
||||
bndPt, clPt: TPoint;
|
||||
MouseTargetLookup: Boolean;
|
||||
begin
|
||||
if Assigned(Owner) and not Owner.lclIsEnabled then
|
||||
begin
|
||||
@ -1258,7 +1259,10 @@ begin
|
||||
MousePos := Event.locationInWindow;
|
||||
OffsetMousePos(MousePos, bndPt, clPt);
|
||||
|
||||
if not AForceObject then
|
||||
// For "dragged" events, the same "Target" should be used
|
||||
MouseTargetLookup := Event.type_ = NSMouseMoved;
|
||||
|
||||
if MouseTargetLookup then
|
||||
begin
|
||||
rect:=Owner.lclClientFrame;
|
||||
targetControl:=nil;
|
||||
|
Loading…
Reference in New Issue
Block a user