GdkWindow is deprecated in GTK3. Splitting out into two accessors.

This commit is contained in:
Jarl Gullberg 2017-06-13 22:45:10 +02:00
parent 3d60cf2bf6
commit 0a95b20860
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -396,13 +396,19 @@ namespace OpenTK
else
Console.WriteLine("OpenTK running on X11");
#if GTK3
IntPtr widgetWindowHandle = this.Window.Handle;
#else
IntPtr widgetWindowHandle = this.GdkWindow.Handle;
#endif
// IWindowInfo
if (Configuration.RunningOnWindows)
_WindowInfo = WinWindowsInfoInitializer.Initialize(this.Window.Handle);
_WindowInfo = WinWindowsInfoInitializer.Initialize(widgetWindowHandle);
else if (Configuration.RunningOnMacOS)
_WindowInfo = OSXWindowInfoInitializer.Initialize(this.Window.Handle);
_WindowInfo = OSXWindowInfoInitializer.Initialize(widgetWindowHandle);
else
_WindowInfo = XWindowInfoInitializer.Initialize(graphicsMode, this.Display.Handle, this.Screen.Number, this.Window.Handle, this.RootWindow.Handle);
_WindowInfo = XWindowInfoInitializer.Initialize(graphicsMode, this.Display.Handle, this.Screen.Number, widgetWindowHandle, this.RootWindow.Handle);
// GraphicsContext
_GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, _GraphicsContextFlags);