mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 06:35:32 +00:00
Trying to debug why Key events do not reach the X11Input window.
This commit is contained in:
parent
888e3be361
commit
ae73c86b8f
|
@ -20,7 +20,6 @@ namespace OpenTK.Platform.X11
|
||||||
KeyEvent keyEvent = new KeyEvent();
|
KeyEvent keyEvent = new KeyEvent();
|
||||||
int pending;
|
int pending;
|
||||||
|
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -77,8 +76,8 @@ namespace OpenTK.Platform.X11
|
||||||
Debug.WriteLine("done! (id: " + window + ")");
|
Debug.WriteLine("done! (id: " + window + ")");
|
||||||
|
|
||||||
// Select input events to be reported here.
|
// Select input events to be reported here.
|
||||||
API.SelectInput(window.Display, window.Handle,
|
//API.SelectInput(window.Display, window.Handle,
|
||||||
EventMask.KeyReleaseMask | EventMask.KeyPressMask);
|
// EventMask.KeyReleaseMask | EventMask.KeyPressMask);
|
||||||
|
|
||||||
keyboardDriver = new X11Keyboard(window);
|
keyboardDriver = new X11Keyboard(window);
|
||||||
|
|
||||||
|
@ -128,18 +127,20 @@ namespace OpenTK.Platform.X11
|
||||||
return;
|
return;
|
||||||
|
|
||||||
API.PeekEvent(window.Display, e);
|
API.PeekEvent(window.Display, e);
|
||||||
|
Debug.Write(String.Format("Input window received {0} event... ", e.Type.ToString()));
|
||||||
|
|
||||||
switch (e.Type)
|
switch (e.Type)
|
||||||
{
|
{
|
||||||
case EventType.KeyPress:
|
case EventType.KeyPress:
|
||||||
case EventType.KeyRelease:
|
case EventType.KeyRelease:
|
||||||
Debug.WriteLine("Key event consumed");
|
|
||||||
API.NextEvent(window.Display, keyEvent);
|
API.NextEvent(window.Display, keyEvent);
|
||||||
|
Debug.WriteLine(" consumed!");
|
||||||
keyboardDriver.ProcessKeyboardEvent(keyEvent);
|
keyboardDriver.ProcessKeyboardEvent(keyEvent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
API.NextEvent(window.Display, e);
|
API.NextEvent(window.Display, e);
|
||||||
|
Debug.WriteLine(" not consumed.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue