ADD: Execute move operation when drag&drop using both mouse buttons (under non Windows)

This commit is contained in:
Alexander Koblov 2017-02-09 20:16:38 +00:00
commit e2fb393bfb

View file

@ -354,20 +354,19 @@ function GetKeyShiftStateEx: TShiftState;
Result := (GetKeyState(Key) and $8000)<>0;
end;
{$IFDEF MSWINDOWS}
procedure GetMouseButtonState;
var
bSwapButton: Boolean;
begin
bSwapButton:= GetSystemMetrics(SM_SWAPBUTTON) <> 0;
if (GetAsyncKeyState(VK_LBUTTON) and $8000 <> 0) then
if IsKeyDown(VK_LBUTTON) then
begin
if bSwapButton then
Include(Result, ssRight)
else
Include(Result, ssLeft);
end;
if (GetAsyncKeyState(VK_RBUTTON) and $8000 <> 0) then
if IsKeyDown(VK_RBUTTON) then
begin
if bSwapButton then
Include(Result, ssLeft)
@ -375,14 +374,13 @@ function GetKeyShiftStateEx: TShiftState;
Include(Result, ssRight);
end;
end;
{$ENDIF}
begin
Result:=[];
{$IFDEF MSWINDOWS}
GetMouseButtonState;
{$IFDEF MSWINDOWS}
if HasKeyboardAltGrKey then
begin
// Windows maps AltGr as Ctrl+Alt combination, so if AltGr is pressed,