Browse Source

Fixes #1317. Forces wakeup the mainloop in a thread.

BDisp 4 years ago
parent
commit
5a35bcae26
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Terminal.Gui/Core/Application.cs

+ 8 - 0
Terminal.Gui/Core/Application.cs

@@ -1223,5 +1223,13 @@ namespace Terminal.Gui {
 			}
 			}
 			return false;
 			return false;
 		}
 		}
+
+		/// <summary>
+		/// Wakes up the mainloop that might be waiting on input, must be thread safe.
+		/// </summary>
+		public static void DoEvents ()
+		{
+			MainLoop.Driver.Wakeup ();
+		}
 	}
 	}
 }
 }