diff --git a/Source/OpenTK/Platform/X11/WindowInfo.cs b/Source/OpenTK/Platform/X11/WindowInfo.cs index 4ff39fd7..859b1c30 100644 --- a/Source/OpenTK/Platform/X11/WindowInfo.cs +++ b/Source/OpenTK/Platform/X11/WindowInfo.cs @@ -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; diff --git a/Source/OpenTK/Platform/X11/X11Input.cs b/Source/OpenTK/Platform/X11/X11Input.cs index 353cae8a..2f322256 100644 --- a/Source/OpenTK/Platform/X11/X11Input.cs +++ b/Source/OpenTK/Platform/X11/X11Input.cs @@ -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();