lcl: gtk2: fixed force realize, issue #37073

git-svn-id: trunk@63166 -
This commit is contained in:
mattias 2020-05-15 22:46:40 +00:00
parent 88ca338944
commit 142965cb34

View File

@ -518,7 +518,7 @@ procedure TGtkDeviceContext.SetWidget(AWidget: PGtkWidget; AWindow: PGdkWindow;
var var
ClientWidget: PGtkWidget; ClientWidget: PGtkWidget;
W: PGtkWidget; W, TopLvlW: PGtkWidget;
begin begin
if FWidget <> nil then if FWidget <> nil then
RaiseWidgetAlreadySet; RaiseWidgetAlreadySet;
@ -552,7 +552,8 @@ begin
if AWindow = nil then if AWindow = nil then
begin begin
W := gtk_widget_get_parent(AWidget); W := gtk_widget_get_parent(AWidget);
if (W <> nil) and not GTK_WIDGET_VISIBLE(W) then TopLvlW := gtk_widget_get_toplevel(AWidget);
if (W <> nil) and GTK_IS_WINDOW(TopLvlW) then
begin begin
//debugln(['TGtkDeviceContext.SetWidget gtk-class=',GetWidgetClassName(W),' lcl-obj=',DbgSName(GetLCLObject(W))]); //debugln(['TGtkDeviceContext.SetWidget gtk-class=',GetWidgetClassName(W),' lcl-obj=',DbgSName(GetLCLObject(W))]);
//we are forcing window creation but not for GtkNotebook //we are forcing window creation but not for GtkNotebook