mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-24 13:19:12 +02:00
LCL-GTK2: Prevent "critical" messages generated by TabControl Tabs. Issue #37924, patch from Anton Kavalenka.
git-svn-id: trunk@64003 -
This commit is contained in:
parent
e0d7c66bd6
commit
32439437d4
@ -4067,11 +4067,13 @@ function GetControlWindow(Widget: Pointer) : PGDKWindow;
|
||||
begin
|
||||
if Widget <> nil then
|
||||
begin
|
||||
gtk_widget_realize(Widget); // associate with window
|
||||
If not GTKWidgetIsA(PGTKWidget(Widget), GTK_Layout_Get_Type) then
|
||||
Result := PGTKWidget(Widget)^.Window
|
||||
else
|
||||
begin
|
||||
gtk_widget_realize(Widget); // associate with window
|
||||
Result := PGtkLayout(Widget)^.bin_window;
|
||||
end;
|
||||
if (Result=nil) and (GTK_WIDGET_NO_WINDOW(Widget)) then
|
||||
Result:=gtk_widget_get_parent_window(Widget);
|
||||
end else
|
||||
|
Loading…
Reference in New Issue
Block a user