Browse Source

ensure higher priority tasks are run before keyboard events.

pull/1977/head
Dan Walmsley 8 years ago
parent
commit
2b081c516f
  1. 4
      src/Avalonia.Native/WindowImplBase.cs

4
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);

Loading…
Cancel
Save