mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 07:35:27 +00:00
Updated X11/X11Input.cs and X11/X11Keyboard.cs. The input window is now a child of the main window, and X11Keyboard now gets the keysym/keycode info.
This commit is contained in:
parent
91d71b754e
commit
19e7aff6ee
|
@ -17,6 +17,12 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
#region --- Constructors ---
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new X11Input driver. Creates a hidden InputOnly window, child to
|
||||
/// the main application window, which selects input events and routes them to
|
||||
/// the device specific drivers (Keyboard, Mouse, Hid).
|
||||
/// </summary>
|
||||
/// <param name="parent"></param>
|
||||
public X11Input(WindowInfo parent)
|
||||
{
|
||||
Debug.WriteLine("Initalizing X11 input driver.");
|
||||
|
@ -37,7 +43,7 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
window.Handle = API.CreateWindow(
|
||||
window.Display,
|
||||
window.RootWindow,
|
||||
window.Parent.Handle,
|
||||
0, 0,
|
||||
1, 1,
|
||||
0,
|
||||
|
|
|
@ -100,7 +100,6 @@ namespace OpenTK.Platform.X11
|
|||
|
||||
internal X11Keyboard(WindowInfo window)
|
||||
{
|
||||
/*
|
||||
this.window = window;
|
||||
Initialize();
|
||||
|
||||
|
@ -113,7 +112,7 @@ namespace OpenTK.Platform.X11
|
|||
//keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[]));
|
||||
|
||||
API.Free(keysym_ptr);
|
||||
*/
|
||||
|
||||
Keyboard kb = new Keyboard();
|
||||
kb.Description = "Default X11 keyboard";
|
||||
kb.NumberOfKeys = lastKeyCode - firstKeyCode + 1;
|
||||
|
|
Loading…
Reference in a new issue