Changed the WindowInfo(WindowInfo parent) constructor to make the newly created window a child of the specified parent. This should be the last bug causing the NRE in X11Input.cs
This commit is contained in:
parent
ab1ec72170
commit
4c38950247
2 changed files with 6 additions and 1 deletions
|
@ -17,7 +17,7 @@ namespace OpenTK.Platform.X11
|
|||
this.Screen = parent.Screen;
|
||||
this.Display = parent.Display;
|
||||
this.RootWindow = parent.RootWindow;
|
||||
this.Handle = parent.Handle;
|
||||
this.Parent = parent;
|
||||
}
|
||||
|
||||
private IntPtr rootWindow, handle, topLevelWindow, display;
|
||||
|
|
|
@ -28,6 +28,11 @@ namespace OpenTK.Platform.X11
|
|||
Debug.WriteLine("Initalizing X11 input driver.");
|
||||
Debug.Indent();
|
||||
|
||||
if (parent == null)
|
||||
{
|
||||
throw new ArgumentException("A valid parent window must be defined, in order to create an X11Input driver.");
|
||||
}
|
||||
|
||||
Debug.WriteLine("Creating hidden input window.");
|
||||
|
||||
SetWindowAttributes wnd_attributes = new SetWindowAttributes();
|
||||
|
|
Loading…
Reference in a new issue