From 4e404500fd52146ad38b0a137988f9b29cb6f062 Mon Sep 17 00:00:00 2001 From: Michalis Kamburelis Date: Tue, 30 Jul 2024 03:25:27 +0200 Subject: [PATCH] Use new FocusFront --- code/gameabstractviewdialog.pas | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/gameabstractviewdialog.pas b/code/gameabstractviewdialog.pas index ed971f4..9197e1d 100644 --- a/code/gameabstractviewdialog.pas +++ b/code/gameabstractviewdialog.pas @@ -47,8 +47,7 @@ procedure TAbstractViewDialog.ClickTransparentBackground(Sender: TObject); begin { Only react to clicks directly on TransparentBackground, not on children like colored rectangles showing dialog inside. } - if (Container.Focus.Count <> 0) and - (Container.Focus.Last = TransparentBackground) then + if Container.FocusFront = TransparentBackground then ClickClose(nil); end;