diff --git a/Terminal.Gui/Core.cs b/Terminal.Gui/Core.cs index 778c55635..e5d713281 100644 --- a/Terminal.Gui/Core.cs +++ b/Terminal.Gui/Core.cs @@ -1726,6 +1726,7 @@ namespace Terminal.Gui { { mainLoop.AddIdle (() => { d (state); + mainLoop.Driver.Wakeup (); return false; }); } diff --git a/Terminal.Gui/MonoCurses/mainloop.cs b/Terminal.Gui/MonoCurses/mainloop.cs index 280c4dfee..f2927f8e0 100644 --- a/Terminal.Gui/MonoCurses/mainloop.cs +++ b/Terminal.Gui/MonoCurses/mainloop.cs @@ -354,10 +354,9 @@ namespace Mono.Terminal { /// public Func AddIdle (Func idleHandler) { - lock (idleHandlers) { + lock (idleHandlers) idleHandlers.Add (idleHandler); - driver.Wakeup (); - } + return idleHandler; }