carbon, cocoa: add WinHandle check into CheckMouseButtonDownUp in case AWinControl is nil. Issue #29769

git-svn-id: trunk@51805 -
This commit is contained in:
ondrej 2016-03-02 14:51:07 +00:00
parent 59cad5781e
commit aa7d1d4437
3 changed files with 5 additions and 5 deletions

View File

@ -268,7 +268,7 @@ begin
Msg.XPos := P.X;
Msg.YPos := P.Y;
Msg.Keys := GetCarbonMsgKeyState;
Msg.Msg := CheckMouseButtonDownUp(AWidget.LCLObject, LastMouse,
Msg.Msg := CheckMouseButtonDownUp(TLCLIntfHandle(AWidget), AWidget.LCLObject, LastMouse,
AWidget.LCLObject.ClientToScreen(P), MouseButton, False);
case LastMouse.ClickCount of
2: Msg.Keys := msg.Keys or MK_DOUBLECLICK;

View File

@ -146,7 +146,7 @@ const
MouseButton := GetCarbonMouseButton(AEvent);
MousePoint := GetMousePoint;
Msg^.Msg := CheckMouseButtonDownUp(Widget.LCLObject, LastMouse,
Msg^.Msg := CheckMouseButtonDownUp(TLCLIntfHandle(AWidget), Widget.LCLObject, LastMouse,
Widget.LCLObject.ClientToScreen(MousePoint), MouseButton, True);
//debugln('HandleMouseDownEvent CliCount=',dbgs(ClickCount),' MouseButton=',dbgs(MouseButton),' Pos=',dbgs(MousePoint));
@ -180,7 +180,7 @@ const
MouseButton := GetCarbonMouseButton(AEvent);
MousePoint := GetMousePoint;
Msg^.Msg := CheckMouseButtonDownUp(Widget.LCLObject, LastMouse,
Msg^.Msg := CheckMouseButtonDownUp(TLCLIntfHandle(AWidget), Widget.LCLObject, LastMouse,
Widget.LCLObject.ClientToScreen(MousePoint), MouseButton, False);
Msg^.XPos := MousePoint.X;

View File

@ -729,7 +729,7 @@ begin
NSRightMouseDown,
NSOtherMouseDown:
begin
Msg.Msg := CheckMouseButtonDownUp(FTarget,LastMouse,
Msg.Msg := CheckMouseButtonDownUp(TLCLIntfHandle(Owner),FTarget,LastMouse,
FTarget.ClientToScreen(Point(Msg.XPos, Msg.YPos)),MButton+1,True);
case LastMouse.ClickCount of
2: Msg.Keys := msg.Keys or MK_DOUBLECLICK;
@ -759,7 +759,7 @@ begin
NSRightMouseUp,
NSOtherMouseUp:
begin
Msg.Msg := CheckMouseButtonDownUp(FTarget,LastMouse,
Msg.Msg := CheckMouseButtonDownUp(TLCLIntfHandle(Owner),FTarget,LastMouse,
FTarget.ClientToScreen(Point(Msg.XPos, Msg.YPos)),MButton+1,False);
case LastMouse.ClickCount of
2: Msg.Keys := msg.Keys or MK_DOUBLECLICK;