Added workaround for the "Resize event called before GraphicsContext is ready" issue.

This commit is contained in:
the_fiddler 2009-10-15 14:52:57 +00:00
parent 723a0dccf2
commit c54d4d180b

View file

@ -191,6 +191,9 @@ namespace OpenTK
/// <param name="e">A System.EventArgs that contains the event data.</param> /// <param name="e">A System.EventArgs that contains the event data.</param>
protected override void OnResize(EventArgs e) protected override void OnResize(EventArgs e)
{ {
if (IsHandleCreated == false)
CreateHandle();
if (context != null) if (context != null)
context.Update(Implementation.WindowInfo); context.Update(Implementation.WindowInfo);