From 69dec33ef7c07ce620f0baa2fab98f40d798c5f2 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 27 Sep 2007 00:40:28 +0000 Subject: [PATCH] Fix build on Mono 1.2.4 --- Source/OpenTK/Platform/X11/WindowInfo.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/X11/WindowInfo.cs b/Source/OpenTK/Platform/X11/WindowInfo.cs index ebcb9e04..8463116d 100644 --- a/Source/OpenTK/Platform/X11/WindowInfo.cs +++ b/Source/OpenTK/Platform/X11/WindowInfo.cs @@ -113,7 +113,11 @@ namespace OpenTK.Platform.X11 this.Handle = info.Handle; this.Parent = info.Parent; - X11.WindowInfo winfo = info as X11.WindowInfo ?? (X11.WindowInfo)(info as Platform.WindowInfo); + // Work around Mono 1.2.4 gmcs bug (resolved in 1.2.5) + // X11.WindowInfo winfo = info as X11.WindowInfo ?? (X11.WindowInfo)(info as Platform.WindowInfo); + X11.WindowInfo winfo = info as X11.WindowInfo; + if (winfo == null) + winfo = (X11.WindowInfo)(info as Platform.WindowInfo); this.RootWindow = winfo.RootWindow; this.TopLevelWindow = winfo.TopLevelWindow;