From fa27fb28c2639d400bdec9b70266dd77ef3dd05d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 26 Oct 2025 20:59:26 +0000 Subject: [PATCH] Address code review feedback - Update RaiseInitializedChanged documentation to clarify it delegates to static event - Pass ApplicationImpl.Instance as sender in legacy Init path instead of null for consistency - All tests still passing Co-authored-by: tig <585482+tig@users.noreply.github.com> --- Terminal.Gui/App/Application.Lifecycle.cs | 2 +- Terminal.Gui/App/ApplicationImpl.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Terminal.Gui/App/Application.Lifecycle.cs b/Terminal.Gui/App/Application.Lifecycle.cs index cf4985c2f..2d31ec08d 100644 --- a/Terminal.Gui/App/Application.Lifecycle.cs +++ b/Terminal.Gui/App/Application.Lifecycle.cs @@ -158,7 +158,7 @@ public static partial class Application // Lifecycle (Init/Shutdown) bool init = Initialized = true; // Raise InitializedChanged event - OnInitializedChanged (null, new (init)); + OnInitializedChanged (ApplicationImpl.Instance, new (init)); } internal static void SubscribeDriverEvents () diff --git a/Terminal.Gui/App/ApplicationImpl.cs b/Terminal.Gui/App/ApplicationImpl.cs index de2dd186f..789832a4f 100644 --- a/Terminal.Gui/App/ApplicationImpl.cs +++ b/Terminal.Gui/App/ApplicationImpl.cs @@ -205,7 +205,7 @@ public class ApplicationImpl : IApplication } /// - /// Internal helper to raise InitializedChanged event. Used by legacy Init path and modern Init path. + /// Internal helper to raise InitializedChanged static event. Used by both legacy and modern Init paths. /// internal void RaiseInitializedChanged (bool initialized) {