mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 22:49:30 +02:00
LCL: Enable propagation of mouse xbutton up/down events. Issue #31456, patch from Jay Themon.
git-svn-id: trunk@54357 -
This commit is contained in:
parent
f9a5a521ee
commit
f435e4865a
@ -2418,12 +2418,10 @@ procedure TControl.WMXButtonDown(var Message: TLMXButtonDown);
|
||||
var
|
||||
Btn: TMouseButton;
|
||||
begin
|
||||
case (Message.Keys shr 16) and $FFFF of
|
||||
1: Btn := mbExtra1;
|
||||
2: Btn := mbExtra2;
|
||||
else
|
||||
Exit;
|
||||
end;
|
||||
if (Message.Keys and MK_XBUTTON1) <> 0 then Btn := mbExtra1
|
||||
else if (Message.Keys and MK_XBUTTON2) <> 0 then Btn := mbExtra2
|
||||
else Exit;
|
||||
|
||||
if (csCaptureMouse in ControlStyle) and (Btn in CaptureMouseButtons) then
|
||||
begin
|
||||
{$IFDEF VerboseMouseCapture}
|
||||
@ -2500,12 +2498,10 @@ procedure TControl.WMXButtonDBLCLK(var Message: TLMXButtonDblClk);
|
||||
var
|
||||
Btn: TMouseButton;
|
||||
begin
|
||||
case (Message.Keys shr 16) and $FFFF of
|
||||
1: Btn := mbExtra1;
|
||||
2: Btn := mbExtra2;
|
||||
else
|
||||
Exit;
|
||||
end;
|
||||
if (Message.Keys and MK_XBUTTON1) <> 0 then Btn := mbExtra1
|
||||
else if (Message.Keys and MK_XBUTTON2) <> 0 then Btn := mbExtra2
|
||||
else Exit;
|
||||
|
||||
if (csCaptureMouse in ControlStyle) and (Btn in CaptureMouseButtons) then
|
||||
begin
|
||||
{$IFDEF VerboseMouseCapture}
|
||||
@ -2579,12 +2575,10 @@ procedure TControl.WMXButtonTripleCLK(var Message: TLMXButtonTripleClk);
|
||||
var
|
||||
Btn: TMouseButton;
|
||||
begin
|
||||
case (Message.Keys shr 16) and $FFFF of
|
||||
1: Btn := mbExtra1;
|
||||
2: Btn := mbExtra2;
|
||||
else
|
||||
Exit;
|
||||
end;
|
||||
if (Message.Keys and MK_XBUTTON1) <> 0 then Btn := mbExtra1
|
||||
else if (Message.Keys and MK_XBUTTON2) <> 0 then Btn := mbExtra2
|
||||
else Exit;
|
||||
|
||||
if (csCaptureMouse in ControlStyle) and (Btn in CaptureMouseButtons) then
|
||||
begin
|
||||
{$IFDEF VerboseMouseCapture}
|
||||
@ -2658,12 +2652,10 @@ procedure TControl.WMXButtonQuadCLK(var Message: TLMXButtonQuadClk);
|
||||
var
|
||||
Btn: TMouseButton;
|
||||
begin
|
||||
case (Message.Keys shr 16) and $FFFF of
|
||||
1: Btn := mbExtra1;
|
||||
2: Btn := mbExtra2;
|
||||
else
|
||||
Exit;
|
||||
end;
|
||||
if (Message.Keys and MK_XBUTTON1) <> 0 then Btn := mbExtra1
|
||||
else if (Message.Keys and MK_XBUTTON2) <> 0 then Btn := mbExtra2
|
||||
else Exit;
|
||||
|
||||
if (csCaptureMouse in ControlStyle) and (Btn in CaptureMouseButtons) then
|
||||
begin
|
||||
{$IFDEF VerboseMouseCapture}
|
||||
@ -2751,12 +2743,10 @@ procedure TControl.WMXButtonUp(var Message: TLMXButtonUp);
|
||||
var
|
||||
Btn: TMouseButton;
|
||||
begin
|
||||
case (Message.Keys shr 16) and $FFFF of
|
||||
1: Btn := mbExtra1;
|
||||
2: Btn := mbExtra2;
|
||||
else
|
||||
Exit;
|
||||
end;
|
||||
if (Message.Keys and MK_XBUTTON1) <> 0 then Btn := mbExtra1
|
||||
else if (Message.Keys and MK_XBUTTON2) <> 0 then Btn := mbExtra2
|
||||
else Exit;
|
||||
|
||||
if (csCaptureMouse in ControlStyle) and (Btn in CaptureMouseButtons) then
|
||||
begin
|
||||
{$IFDEF VerboseMouseCapture}
|
||||
|
@ -2037,11 +2037,6 @@ var
|
||||
MessI.Msg := CheckMouseButtonDownUp({%H-}TLCLIntfHandle(widget), AWinControl, LastMouse, EventXY, MouseButton, True);
|
||||
MessI.Keys := MessI.Keys or BtnKey;
|
||||
case LastMouse.ClickCount of
|
||||
1:
|
||||
case BtnKey of
|
||||
MK_XBUTTON1: MessI.Keys:=MessI.Keys or (1 shl 16);
|
||||
MK_XBUTTON2: MessI.Keys:=MessI.Keys or (2 shl 16);
|
||||
end;
|
||||
2: MessI.Keys := MessI.Keys or MK_DOUBLECLICK;
|
||||
3: MessI.Keys := MessI.Keys or MK_TRIPLECLICK;
|
||||
4: MessI.Keys := MessI.Keys or MK_QUADCLICK;
|
||||
|
Loading…
Reference in New Issue
Block a user