diff --git a/Source/OpenTK/Platform/X11/X11GLContext.cs b/Source/OpenTK/Platform/X11/X11GLContext.cs index bc27eb00..0b5fa3de 100644 --- a/Source/OpenTK/Platform/X11/X11GLContext.cs +++ b/Source/OpenTK/Platform/X11/X11GLContext.cs @@ -89,7 +89,7 @@ namespace OpenTK.Platform.X11 } windowInfo.CopyInfoFrom(info); - visual = Glx.ChooseVisual(((X11.WindowInfo)info).Display, ((X11.WindowInfo)info).Screen, visualAttributes.ToArray()); + visual = Glx.ChooseVisual(windowInfo.Display, windowInfo.Screen, visualAttributes.ToArray()); if (visual == IntPtr.Zero) return false; else