Fix build on Mono 1.2.4

This commit is contained in:
the_fiddler 2007-09-27 00:40:28 +00:00
parent 437bf7946b
commit 69dec33ef7

View file

@ -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;