|
@@ -18,6 +18,7 @@ using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using NStack;
|
|
using NStack;
|
|
|
|
+using System.ComponentModel;
|
|
|
|
|
|
namespace Terminal.Gui {
|
|
namespace Terminal.Gui {
|
|
|
|
|
|
@@ -1910,6 +1911,14 @@ namespace Terminal.Gui {
|
|
var rs = new RunState (toplevel);
|
|
var rs = new RunState (toplevel);
|
|
|
|
|
|
Init ();
|
|
Init ();
|
|
|
|
+ if (toplevel is ISupportInitializeNotification initializableNotification &&
|
|
|
|
+ !initializableNotification.IsInitialized) {
|
|
|
|
+ initializableNotification.BeginInit();
|
|
|
|
+ initializableNotification.EndInit();
|
|
|
|
+ } else if (toplevel is ISupportInitialize initializable) {
|
|
|
|
+ initializable.BeginInit();
|
|
|
|
+ initializable.EndInit();
|
|
|
|
+ }
|
|
toplevels.Push (toplevel);
|
|
toplevels.Push (toplevel);
|
|
Current = toplevel;
|
|
Current = toplevel;
|
|
Driver.PrepareToRun (MainLoop, ProcessKeyEvent, ProcessMouseEvent);
|
|
Driver.PrepareToRun (MainLoop, ProcessKeyEvent, ProcessMouseEvent);
|