LCL: Use "real" system capture for TMouse.capture property. Issue #28238, patch from Andrew G. Khodotov.

git-svn-id: trunk@49254 -
This commit is contained in:
juha 2015-06-03 17:23:21 +00:00
parent 25db164995
commit 11612bcf6b
2 changed files with 1 additions and 4 deletions

View File

@ -2492,7 +2492,6 @@ type
TMouse = class
private
FCapture: HWND;
FWheelScrollLines: Integer;
procedure SetCapture(const Value: HWND);
function GetCapture: HWND;

View File

@ -14,7 +14,7 @@
function TMouse.GetCapture: HWND;
begin
Result := FCapture;
Result := LCLIntf.GetCapture;
end;
procedure TMouse.SetCapture(const Value: HWND);
@ -22,12 +22,10 @@ begin
{$IFDEF VerboseMouseCapture}
DebugLn('TMouse.SetCapture ');
{$ENDIF}
FCapture := Value;
if Value = 0 then
ReleaseCapture
else
LCLIntf.SetCapture(Value);
FCapture := GetCapture;
end;
function TMouse.GetCursorPos: TPoint;