Преглед на файлове

ensure higher priority tasks are run before keyboard events.

Dan Walmsley преди 7 години
родител
ревизия
2b081c516f
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      src/Avalonia.Native/WindowImplBase.cs

+ 4 - 0
src/Avalonia.Native/WindowImplBase.cs

@@ -184,6 +184,8 @@ namespace Avalonia.Native
 
         public bool RawTextInputEvent(uint timeStamp, string text)
         {
+            Dispatcher.UIThread.RunJobs(DispatcherPriority.Input + 1);
+
             var args = new RawTextInputEventArgs(_keyboard, timeStamp, text);
 
             Input?.Invoke(args);
@@ -193,6 +195,8 @@ namespace Avalonia.Native
 
         public bool RawKeyEvent(AvnRawKeyEventType type, uint timeStamp, AvnInputModifiers modifiers, uint key)
         {
+            Dispatcher.UIThread.RunJobs(DispatcherPriority.Input + 1);
+
             var args = new RawKeyEventArgs(_keyboard, timeStamp, (RawKeyEventType)type, (Key)key, (InputModifiers)modifiers);
 
             Input?.Invoke(args);