w32 mouse extra button 4&5 do not call MouseUp
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
On w32 TComtrol's
procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); virtual;
is not called when the extra btn is released
the check below tests MK_XBUTTON1 against the list of buttons/keys that are currently/still down. The released btn is never in that list.
http://msdn.microsoft.com/en-us/site/ms646246 statesS
wParam
The low-order word indicates whether various virtual keys *are* down.
The high-order word indicates which button was double-clicked. It can be one of the following values.
XBUTTON1 0x0001 The first X button was double-clicked.
XBUTTON2 0x0002 The second X button was double-clicked.
According to my test the high order flags are present in single click. They appear to indicate which btn changed
Similar code exists for WHXButtonDown
This means: Press and hold Extra-1, then press Extra-2. This reports a 2nd down for extra-1
Additional information:
lcl\include\control.inc
line 2315
procedure TControl.WMXButtonUp(var Message: TLMXButtonUp);
var
Btn: TMouseButton;
begin
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}
DebugLn('TControl.WMMButtonUp ',Name,':',ClassName);
{$ENDIF}
MouseCapture := False;
end;
DoMouseUp(Message, Btn);
end;
Mantis conversion info:
- Mantis ID: 20883
- Version: 0.9.31 (SVN)
- Fixed in version: 1.1 (SVN)
- Fixed in revision: 41684 (#e241c969)
- Target version: 1.2.0
- LazTarget: 1.2