Merge branch 'GtkPartialMerge' into 'main'

GTK3: Passed handle of hint win control to WS inside hint data pointer.

See merge request freepascal.org/lazarus/lazarus!212
This commit is contained in:
Maxim Ganetsky 2023-06-24 14:09:10 +00:00
commit 8f8892313a
2 changed files with 16 additions and 0 deletions

View File

@ -848,6 +848,7 @@ begin
Visible := False;
Caption := '';
AutoHide := False;
HintData := Pointer((FHintControl as TWinControl).Handle);
end;
end;

View File

@ -814,6 +814,7 @@ type
TGtk3HintWindow = class(TGtk3Window)
private
procedure InitializeWidget; override;
protected
function CreateWidget(const {%H-}Params: TCreateParams):PGtkWidget; override;
end;
@ -7896,6 +7897,20 @@ begin
end;
procedure TGtk3HintWindow.InitializeWidget;
var
ParentWidget: TGtk3Widget;
begin
inherited;
with LCLObject as THintWindow do begin
if Assigned(HintData) then begin
ParentWidget := TGtk3Widget(HintData);
FWidget^.realize;
GetWindow^.set_transient_for(ParentWidget.GetWindow);
end;
end;
end;
{ TGtk3Dialog }
procedure TGtk3Dialog.SetCallbacks;