FIX: Wrong main form position

This commit is contained in:
Alexander Koblov 2018-12-19 17:37:07 +00:00
commit 5bbf172fef

View file

@ -745,6 +745,7 @@ type
procedure SetDragCursor(Shift: TShiftState);
protected
procedure CreateWnd; override;
{$if lcl_fullversion >= 1070000}
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double); override;
@ -978,9 +979,6 @@ begin
Application.OnEndSession := @AppEndSession;
Application.OnQueryEndSession := @AppQueryEndSession;
// Save real main form handle
Application.MainForm.Tag:= Handle;
// Use LCL's method of dropping files from external
// applications if we don't support it ourselves.
if not IsExternalDraggingSupported then
@ -1071,8 +1069,6 @@ begin
HMMainForm.RegisterActionList(actionlst);
{ *HotKeys* }
LoadWindowState;
// frost_asm begin
lastWindowState:=WindowState;
// frost_asm end
@ -3673,6 +3669,17 @@ begin
FrameRight.SetDragCursor(Shift);
end;
procedure TfrmMain.CreateWnd;
begin
// Must be before CreateWnd
LoadWindowState;
inherited CreateWnd;
// Save real main form handle
Application.MainForm.Tag:= Handle;
end;
{$if lcl_fullversion >= 1070000}
procedure TfrmMain.DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
const AXProportion, AYProportion: Double);