mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 09:59:10 +02:00
LCL: getmousecapture: check if handleallocated
git-svn-id: trunk@42305 -
This commit is contained in:
parent
2fe9905694
commit
533ea4f496
lcl
@ -1133,7 +1133,6 @@ type
|
||||
function GetClientHeight: Integer;
|
||||
function GetClientWidth: Integer;
|
||||
function GetLRDockWidth: Integer;
|
||||
function GetMouseCapture: Boolean;
|
||||
function GetTBDockHeight: Integer;
|
||||
function GetText: TCaption;
|
||||
function GetUndockHeight: Integer;
|
||||
@ -1353,6 +1352,7 @@ type
|
||||
procedure SetParentComponent(NewParentComponent: TComponent); override;
|
||||
procedure WndProc(var TheMessage: TLMessage); virtual;
|
||||
procedure ParentFormHandleInitialized; virtual; // called by ChildHandlesCreated of parent form
|
||||
function GetMouseCapture: Boolean; virtual;
|
||||
procedure CaptureChanged; virtual;
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
function CanTab: Boolean; virtual;
|
||||
@ -2065,6 +2065,7 @@ type
|
||||
procedure MainWndProc(var Msg: TLMessage);
|
||||
procedure ParentFormHandleInitialized; override;
|
||||
procedure ChildHandlesCreated; virtual;// called after children handles are created
|
||||
function GetMouseCapture: Boolean; override;
|
||||
procedure RealSetText(const AValue: TCaption); override;
|
||||
procedure RemoveFocus(Removing: Boolean);
|
||||
procedure SendMoveSizeMessages(SizeChanged, PosChanged: boolean); override;
|
||||
|
@ -1738,7 +1738,7 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
function TControl.GetMouseCapture : Boolean;
|
||||
begin
|
||||
Result := GetCaptureControl = Self;
|
||||
Result := (Parent<>nil) and Parent.HandleAllocated and (GetCaptureControl = Self);
|
||||
end;
|
||||
|
||||
function TControl.GetTBDockHeight: Integer;
|
||||
|
@ -7509,6 +7509,11 @@ begin
|
||||
Exclude(FWinControlFlags,wcfCreatingChildHandles);
|
||||
end;
|
||||
|
||||
function TWinControl.GetMouseCapture: Boolean;
|
||||
begin
|
||||
Result:=HandleAllocated and (GetCaptureControl=Self);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
function TWinControl.ParentHandlesAllocated: boolean;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user