mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 12:40:33 +02:00
gtk3: fixed gtk3 assertion in form SetBounds()
git-svn-id: trunk@55072 -
This commit is contained in:
parent
94be804f66
commit
b3cebb8792
@ -199,6 +199,7 @@ var
|
||||
AHints: TGdkWindowHints;
|
||||
AFixedWidthHeight: Boolean;
|
||||
AForm: TCustomForm;
|
||||
AMinSize, ANaturalSize: gint;
|
||||
begin
|
||||
if not WSCheckHandleAllocated(AWinControl, 'SetBounds') then
|
||||
Exit;
|
||||
@ -213,6 +214,10 @@ begin
|
||||
ARect.width := AWidth;
|
||||
ARect.Height := AHeight;
|
||||
try
|
||||
{fixes gtk3 assertion}
|
||||
PGtkWindow(AWidget)^.get_preferred_width(@AMinSize, @ANaturalSize);
|
||||
PGtkWindow(AWidget)^.get_preferred_height(@AMinSize, @ANaturalSize);
|
||||
|
||||
AWidget^.size_allocate(@ARect);
|
||||
if not (csDesigning in AForm.ComponentState) and (AForm.Parent = nil) and (AForm.ParentWindow = 0) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user