Sfoglia il codice sorgente

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

BDisp 4 anni fa
parent
commit
5a35bcae26
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      Terminal.Gui/Core/Application.cs

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

@@ -1223,5 +1223,13 @@ namespace Terminal.Gui {
 			}
 			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 ();
+		}
 	}
 }