mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 10:35:38 +00:00
Slightly changed debug output on Create event (X11GLNative)
Corrected event hooking in X11Input.
This commit is contained in:
parent
6ccbfb266e
commit
4c0b710fa6
|
@ -283,8 +283,8 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
if (this.Create != null)
|
if (this.Create != null)
|
||||||
{
|
{
|
||||||
|
Debug.Print("Create event fired from window: {0}", info.ToString());
|
||||||
this.Create(this, e);
|
this.Create(this, e);
|
||||||
Debug.Print("OnCreate fired, from window: {0}", info.ToString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
Event e = new Event();
|
Event e = new Event();
|
||||||
KeyEvent keyEvent = new KeyEvent();
|
KeyEvent keyEvent = new KeyEvent();
|
||||||
|
int pending;
|
||||||
|
|
||||||
|
|
||||||
#region --- Constructors ---
|
#region --- Constructors ---
|
||||||
|
@ -115,16 +116,31 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Consumes to keyboard, mouse, etc events, routing them to their
|
||||||
|
/// respective drivers.
|
||||||
|
/// </summary>
|
||||||
public void ProcessEvents()
|
public void ProcessEvents()
|
||||||
{
|
{
|
||||||
|
pending = API.Pending(window.Display);
|
||||||
|
|
||||||
|
if (pending == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
API.PeekEvent(window.Display, e);
|
API.PeekEvent(window.Display, e);
|
||||||
|
|
||||||
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);
|
||||||
keyboardDriver.ProcessKeyboardEvent(keyEvent);
|
keyboardDriver.ProcessKeyboardEvent(keyEvent);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
API.NextEvent(window.Display, e);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue