LCL Carbon: fixed 0010872: Block select on the Carbon IDE doesn't work as expected

mouse moves are called only when there is really some change

git-svn-id: trunk@14435 -
This commit is contained in:
tombo 2008-03-05 17:03:39 +00:00
parent d0b3a6aebd
commit 1783c8195e
2 changed files with 7 additions and 0 deletions

View File

@ -334,6 +334,9 @@ var PrevKeyModifiers: UInt32 = 0;
// Stores mouse up message to be fired on control hit after value is updated
var SavedMouseUpMsg: TLMMouse;
// Stores last mouse pos to call mouse move only when it really has changed
var LastMousePos: TPoint;
{$I carbonprivatecommon.inc}
{$I carbonprivatecontrol.inc}
{$I carbonprivatewindow.inc}

View File

@ -121,6 +121,8 @@ begin
if Widget <> nil then
begin
P := Widget.GetMousePos;
if (LastMousePos.X = P.X) and (LastMousePos.Y = P.Y) then Exit;
LastMousePos := P;
if Widget is TCarbonControl then
if cceDoAction in (Widget as TCarbonControl).GetValidEvents then
@ -192,6 +194,8 @@ begin
Msg.YPos := P.Y;
Msg.Keys := GetCarbonMsgKeyState;
LastMousePos := P;
if (AWidget is TCarbonControl) and
(cceHit in (AWidget as TCarbonControl).GetValidEvents) then
begin