From 11612bcf6b9dd505c7bb89dd2bcc1e9416243ebc Mon Sep 17 00:00:00 2001 From: juha Date: Wed, 3 Jun 2015 17:23:21 +0000 Subject: [PATCH] LCL: Use "real" system capture for TMouse.capture property. Issue #28238, patch from Andrew G. Khodotov. git-svn-id: trunk@49254 - --- lcl/controls.pp | 1 - lcl/include/mouse.inc | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lcl/controls.pp b/lcl/controls.pp index 55fafbc883..64a844d871 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -2492,7 +2492,6 @@ type TMouse = class private - FCapture: HWND; FWheelScrollLines: Integer; procedure SetCapture(const Value: HWND); function GetCapture: HWND; diff --git a/lcl/include/mouse.inc b/lcl/include/mouse.inc index dbd1b6b2a0..ad42f8dba6 100644 --- a/lcl/include/mouse.inc +++ b/lcl/include/mouse.inc @@ -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;