FIX: Confirmation dialog appears on the wrong display in a multi monitor config (fixes #633)

This commit is contained in:
Alexander Koblov 2022-11-15 19:09:00 +03:00
commit d39cb6dfcb
2 changed files with 15 additions and 10 deletions

View file

@ -11,6 +11,7 @@ object frmMsg: TfrmMsg
ClientHeight = 254
ClientWidth = 426
Constraints.MinWidth = 250
DefaultMonitor = dmMainForm
KeyPreview = True
OnClose = FormClose
OnCreate = FormCreate

View file

@ -6910,20 +6910,24 @@ begin
Exit;
{ update restored bounds }
if WindowState = wsNormal then
begin
if FDelayedWMMove then
begin
if FDelayedWMMove then
begin
FRestoredLeft := Left;
FRestoredTop := Top;
end;
if FDelayedWMSize then
begin
FRestoredWidth := Width;
FRestoredHeight := Height;
end;
FRestoredLeft := Left;
FRestoredTop := Top;
end;
if FDelayedWMSize then
begin
FRestoredWidth := Width;
FRestoredHeight := Height;
end;
end;
FDelayedWMMove := False;
FDelayedWMSize := False;
// Sync position and size with real main form
with BoundsRect do
Application.MainForm.SetBounds(Left, Top, Width, Height);
end;
procedure TfrmMain.AppActivate(Sender: TObject);