mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 21:30:34 +02:00
Gtk2: Gtk2WSCustomPanel respect TCustomPanel.Visible property when creating handle. issue #23940
git-svn-id: trunk@40371 -
This commit is contained in:
parent
a8b657b971
commit
35b60c2c6c
@ -241,6 +241,12 @@ begin
|
||||
//debugln(['TGtk2WSCustomPanel.CreateHandle Frame^.allocation=',dbgs(Frame^.allocation),' WidgetClient^.allocation=',dbgs(WidgetClient^.allocation)]);
|
||||
|
||||
Set_RC_Name(AWinControl, Frame);
|
||||
|
||||
// issue #23940. Hide panel if we are not visible, but before setting callbacks.
|
||||
// so it won't trigger unnecessary events to LCL.
|
||||
if not AWinControl.Visible and not (csDesigning in AWinControl.ComponentState) then
|
||||
gtk_widget_hide(Frame);
|
||||
|
||||
SetCallbacks(Frame, WidgetInfo);
|
||||
|
||||
Result := TLCLIntfHandle({%H-}PtrUInt(Frame));
|
||||
|
Loading…
Reference in New Issue
Block a user