gtk2: fix mouse keys in mouse messages

git-svn-id: trunk@51725 -
This commit is contained in:
ondrej 2016-02-27 06:30:20 +00:00
parent 396007f486
commit 578a281e53

View File

@ -2061,6 +2061,11 @@ var
MessI.Msg := CheckMouseButtonDownUp(AWinControl, LastMouse, EventXY, MouseButton, True);
MessI.Keys := MessI.Keys or BtnKey;
case LastMouse.ClickCount of
2: Msg.Keys := Msg.Keys or MK_DOUBLECLICK;
3: Msg.Keys := Msg.Keys or MK_TRIPLECLICK;
4: Msg.Keys := Msg.Keys or MK_QUADCLICK;
end;
{$IFDEF VerboseMouseBugfix}
DebugLn(' ClickCount=',dbgs(LastMouse.ClickCount));
@ -2223,6 +2228,11 @@ var
function CheckMouseButtonUp(MouseButton, BtnKey: longint): boolean;
begin
MessI.Msg := CheckMouseButtonDownUp(AWinControl, LastMouse, EventXY, MouseButton, False);
case LastMouse.ClickCount of
2: Msg.Keys := Msg.Keys or MK_DOUBLECLICK;
3: Msg.Keys := Msg.Keys or MK_TRIPLECLICK;
4: Msg.Keys := Msg.Keys or MK_QUADCLICK;
end;
Result := True;
end;