mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:02:41 +02:00
GTK3: Fixed crash on Win64 after recent changes on GTK3 hints.
Seems that on Win64, `FHintControl` is not always a valid `TWinControl` class instance.
This commit is contained in:
parent
ed0b79bf27
commit
58645a39f4
@ -991,6 +991,7 @@ type
|
|||||||
FAutoHide: Boolean;
|
FAutoHide: Boolean;
|
||||||
FAutoHideTimer: TCustomTimer;
|
FAutoHideTimer: TCustomTimer;
|
||||||
FHideInterval: Integer;
|
FHideInterval: Integer;
|
||||||
|
FHintCtrl: TControl;
|
||||||
procedure AdjustBoundsForMonitor(KeepWidth: Boolean = True;
|
procedure AdjustBoundsForMonitor(KeepWidth: Boolean = True;
|
||||||
KeepHeight: Boolean = True);
|
KeepHeight: Boolean = True);
|
||||||
function GetDrawTextFlags: Cardinal;
|
function GetDrawTextFlags: Cardinal;
|
||||||
@ -1040,6 +1041,7 @@ type
|
|||||||
property HintRect: TRect read FHintRect write FHintRect;
|
property HintRect: TRect read FHintRect write FHintRect;
|
||||||
property HintRectAdjust: TRect read FHintRect write SetHintRectAdjust;
|
property HintRectAdjust: TRect read FHintRect write SetHintRectAdjust;
|
||||||
property HintData: Pointer read FHintData write FHintData;
|
property HintData: Pointer read FHintData write FHintData;
|
||||||
|
property HintControl: TControl read FHintCtrl write FHintCtrl; experimental;
|
||||||
property AutoHide: Boolean read FAutoHide write SetAutoHide;
|
property AutoHide: Boolean read FAutoHide write SetAutoHide;
|
||||||
property BiDiMode;
|
property BiDiMode;
|
||||||
property HideInterval: Integer read FHideInterval write SetHideInterval;
|
property HideInterval: Integer read FHideInterval write SetHideInterval;
|
||||||
|
@ -850,7 +850,7 @@ begin
|
|||||||
Visible := False;
|
Visible := False;
|
||||||
Caption := '';
|
Caption := '';
|
||||||
AutoHide := False;
|
AutoHide := False;
|
||||||
HintData := Pointer((FHintControl as TWinControl).Handle);
|
HintControl := FHintControl;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -7903,8 +7903,8 @@ var
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
with LCLObject as THintWindow do begin
|
with LCLObject as THintWindow do begin
|
||||||
if Assigned(HintData) then begin
|
if HintControl is TWinControl then with HintControl as TWinControl do begin
|
||||||
ParentWidget := TGtk3Widget(HintData);
|
ParentWidget := TGtk3Widget(Handle);
|
||||||
FWidget^.realize;
|
FWidget^.realize;
|
||||||
GetWindow^.set_transient_for(ParentWidget.GetWindow);
|
GetWindow^.set_transient_for(ParentWidget.GetWindow);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user