mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-22 09:01:00 +00:00
GdkWindow is deprecated in GTK3. Splitting out into two accessors.
This commit is contained in:
parent
3d60cf2bf6
commit
0a95b20860
|
@ -396,13 +396,19 @@ namespace OpenTK
|
||||||
else
|
else
|
||||||
Console.WriteLine("OpenTK running on X11");
|
Console.WriteLine("OpenTK running on X11");
|
||||||
|
|
||||||
|
#if GTK3
|
||||||
|
IntPtr widgetWindowHandle = this.Window.Handle;
|
||||||
|
#else
|
||||||
|
IntPtr widgetWindowHandle = this.GdkWindow.Handle;
|
||||||
|
#endif
|
||||||
|
|
||||||
// IWindowInfo
|
// IWindowInfo
|
||||||
if (Configuration.RunningOnWindows)
|
if (Configuration.RunningOnWindows)
|
||||||
_WindowInfo = WinWindowsInfoInitializer.Initialize(this.Window.Handle);
|
_WindowInfo = WinWindowsInfoInitializer.Initialize(widgetWindowHandle);
|
||||||
else if (Configuration.RunningOnMacOS)
|
else if (Configuration.RunningOnMacOS)
|
||||||
_WindowInfo = OSXWindowInfoInitializer.Initialize(this.Window.Handle);
|
_WindowInfo = OSXWindowInfoInitializer.Initialize(widgetWindowHandle);
|
||||||
else
|
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
|
||||||
_GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, _GraphicsContextFlags);
|
_GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, _GraphicsContextFlags);
|
||||||
|
|
Loading…
Reference in a new issue