diff --git a/Projects/Compil32.dpr b/Projects/Compil32.dpr index 512a4b87..da18d5f0 100644 --- a/Projects/Compil32.dpr +++ b/Projects/Compil32.dpr @@ -214,6 +214,9 @@ begin CheckParams; RegisterApplicationRestart; + if not CommandLineWizard then + Application.MainFormOnTaskBar := True; + { The 'with' is so that the Delphi IDE doesn't mess with these } with Application do begin if CommandLineWizard then diff --git a/Projects/Src/IDE.MainForm.pas b/Projects/Src/IDE.MainForm.pas index fefc4af5..2dcbdb41 100644 --- a/Projects/Src/IDE.MainForm.pas +++ b/Projects/Src/IDE.MainForm.pas @@ -1110,7 +1110,11 @@ destructor TMainForm.Destroy; Ini.WriteInteger('State', 'WindowTop', WindowPlacement.rcNormalPosition.Top); Ini.WriteInteger('State', 'WindowRight', WindowPlacement.rcNormalPosition.Right); Ini.WriteInteger('State', 'WindowBottom', WindowPlacement.rcNormalPosition.Bottom); - Ini.WriteBool('State', 'WindowMaximized', WindowState = wsMaximized); + { The GetWindowPlacement docs claim that "flags" is always zero. + Fortunately, that's wrong. WPF_RESTORETOMAXIMIZED is set when the + window is either currently maximized, or currently minimized from a + previous maximized state. } + Ini.WriteBool('State', 'WindowMaximized', WindowPlacement.flags and WPF_RESTORETOMAXIMIZED <> 0); Ini.WriteInteger('State', 'StatusPanelHeight', FromCurrentPPI(StatusPanel.Height)); { Zoom state }