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 TMouse = class
private private
FCapture: HWND;
FWheelScrollLines: Integer; FWheelScrollLines: Integer;
procedure SetCapture(const Value: HWND); procedure SetCapture(const Value: HWND);
function GetCapture: HWND; function GetCapture: HWND;

View File

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