mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 06:39:19 +02:00
lcl: delay autosize when form is minimized, bug #30826
git-svn-id: trunk@53334 -
This commit is contained in:
parent
e50e59fab7
commit
0a383ad832
@ -1148,7 +1148,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
if (State = wsMinimized) and (Application.MainForm = Self) and
|
if (State = wsMinimized) and (Application.MainForm = Self) and
|
||||||
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
|
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
|
||||||
Application.Minimize;
|
Application.Minimize;
|
||||||
if (OldState = wsMinimized) and (Application.MainForm = Self) and
|
if (OldState = wsMinimized) and (Application.MainForm = Self) and
|
||||||
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
|
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
|
||||||
Application.Restore;
|
Application.Restore;
|
||||||
@ -2267,7 +2267,10 @@ end;
|
|||||||
------------------------------------------------------------------------------}
|
------------------------------------------------------------------------------}
|
||||||
function TCustomForm.AutoSizeDelayedHandle: Boolean;
|
function TCustomForm.AutoSizeDelayedHandle: Boolean;
|
||||||
begin
|
begin
|
||||||
if (Parent<>nil) or (ParentWindow<>0) then
|
if WindowState=wsMinimized then
|
||||||
|
// this form is minimized => no valid width/height, see bug 30826
|
||||||
|
Result:=true
|
||||||
|
else if (Parent<>nil) or (ParentWindow<>0) then
|
||||||
// this form is inlined / embedded it works like a normal TWinControl
|
// this form is inlined / embedded it works like a normal TWinControl
|
||||||
Result:=inherited AutoSizeDelayedHandle
|
Result:=inherited AutoSizeDelayedHandle
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user