mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 06:38:11 +01:00
Revert r63842 #475bc75d3e because of a regression. Issue #37732.
git-svn-id: trunk@63882 -
This commit is contained in:
parent
f7701ffbe4
commit
09aece8f24
@ -492,7 +492,7 @@ type
|
||||
FWindowState: TWindowState;
|
||||
FDelayedEventCtr: Integer;
|
||||
FDelayedOnChangeBounds, FDelayedOnResize: Boolean;
|
||||
FIsFirstOnShow, FIsFirstOnActivate, FIsFirstRestore: Boolean;
|
||||
FIsFirstOnShow, FIsFirstOnActivate: Boolean;
|
||||
function GetClientHandle: HWND;
|
||||
function GetEffectiveShowInTaskBar: TShowInTaskBar;
|
||||
function GetMonitor: TMonitor;
|
||||
|
||||
@ -720,17 +720,14 @@ begin
|
||||
Activate;
|
||||
end;
|
||||
end;
|
||||
if not (FIsFirstOnShow or FIsFirstOnActivate) then
|
||||
begin
|
||||
{ delayed onResize() }
|
||||
if FDelayedOnResize then
|
||||
inherited DoOnResize;
|
||||
{ delayed onChangeBounds() }
|
||||
if FDelayedOnResize or FDelayedOnChangeBounds then
|
||||
inherited DoOnChangeBounds;
|
||||
FDelayedOnChangeBounds := False;
|
||||
FDelayedOnResize := False;
|
||||
end;
|
||||
{ delayed onResize() }
|
||||
if FDelayedOnResize then
|
||||
inherited DoOnResize;
|
||||
{ delayed onChangeBounds() }
|
||||
if FDelayedOnResize or FDelayedOnChangeBounds then
|
||||
inherited DoOnChangeBounds;
|
||||
FDelayedOnChangeBounds := False;
|
||||
FDelayedOnResize := False;
|
||||
end;
|
||||
|
||||
procedure TCustomForm.WMWindowPosChanged(var Message: TLMWindowPosChanged);
|
||||
@ -1004,7 +1001,6 @@ begin
|
||||
if FIsFirstOnShow and (WindowState in [wsMaximized, wsFullScreen]) then
|
||||
Exit;
|
||||
FIsFirstOnShow := False;
|
||||
FIsFirstRestore := WindowState in [wsMaximized, wsFullScreen];
|
||||
if Assigned(FOnShow) then FOnShow(Self);
|
||||
end;
|
||||
|
||||
@ -1143,15 +1139,17 @@ begin
|
||||
if Showing and not (csDesigning in ComponentState) then
|
||||
begin
|
||||
OldState := FWindowState;
|
||||
FWindowState := State;
|
||||
if OldState <> State then
|
||||
begin
|
||||
WindowState := State;
|
||||
if (State = wsMinimized) and (Application.MainForm = Self) and
|
||||
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
|
||||
Application.Minimize;
|
||||
if (OldState = wsMinimized) and (Application.MainForm = Self) and
|
||||
(WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm) <> LCL_CAPABILITY_NO) then
|
||||
Application.Restore;
|
||||
if Assigned(OnWindowStateChange) then
|
||||
OnWindowStateChange(Self);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -1832,19 +1830,7 @@ begin
|
||||
FWindowState := Value;
|
||||
//DebugLn(['TCustomForm.SetWindowState ',DbgSName(Self),' ',ord(FWindowState),' csDesigning=',csDesigning in ComponentState,' Showing=',Showing]);
|
||||
if (not (csDesigning in ComponentState)) and Showing then
|
||||
begin
|
||||
ShowWindow(Handle, ShowCommands[Value]);
|
||||
if not (FIsFirstOnShow or FIsFirstOnActivate) then
|
||||
begin
|
||||
if FIsFirstRestore then
|
||||
begin
|
||||
MoveToDefaultPosition;
|
||||
FIsFirstRestore := False;
|
||||
end;
|
||||
if Assigned(OnWindowStateChange) then
|
||||
OnWindowStateChange(Self);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -2044,7 +2030,6 @@ begin
|
||||
FDelayedOnResize := False;
|
||||
FIsFirstOnShow := True;
|
||||
FIsFirstOnActivate := True;
|
||||
FIsFirstRestore := False;
|
||||
GlobalNameSpace.BeginWrite;
|
||||
try
|
||||
CreateNew(AOwner, 1); // this calls BeginFormUpdate, which is ended in AfterConstruction
|
||||
|
||||
@ -1121,8 +1121,6 @@ begin
|
||||
{$ENDIF}
|
||||
SizeMsg.SizeType := SIZE_MINIMIZED;
|
||||
end
|
||||
else if (GDK_WINDOW_STATE_FULLSCREEN and state^.new_window_state)>0 then
|
||||
SizeMsg.SizeType := SIZE_FULLSCREEN
|
||||
else if (GDK_WINDOW_STATE_MAXIMIZED and state^.new_window_state)>0 then
|
||||
begin
|
||||
// it can be both maximized + iconified and just loose iconified state
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
{$ENDIF}
|
||||
type
|
||||
TWinControlAccess = class(TWinControl);
|
||||
TApplicationAccess = class(TApplication);
|
||||
{*************************************************************}
|
||||
{ callback routines }
|
||||
{*************************************************************}
|
||||
@ -2055,8 +2054,6 @@ begin
|
||||
begin
|
||||
CheckSynchronize;
|
||||
TWin32Widgetset(Widgetset).CheckPipeEvents;
|
||||
if Assigned(Application) then
|
||||
TApplicationAccess(Application).ProcessAsyncCallQueue;
|
||||
end;
|
||||
WM_ENTERIDLE: Application.Idle(False);
|
||||
WM_ACTIVATE: SetLMessageAndParams(LM_ACTIVATE);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user