diff --git a/Source/OpenTK/GameWindow.cs b/Source/OpenTK/GameWindow.cs index 787a24d0..5aaeeb7d 100644 --- a/Source/OpenTK/GameWindow.cs +++ b/Source/OpenTK/GameWindow.cs @@ -125,6 +125,8 @@ namespace OpenTK "Your platform is not supported currently. Please, refer to http://opentk.sourceforge.net for more information."); } + glWindow.Destroy += glWindow_Destroy; + CreateWindow(mode, title); //this.vsync = VSyncMode.Adaptive; diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index 57322a80..c1b6cb3d 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -111,8 +111,8 @@ namespace OpenTK.Platform.Windows case WindowMessage.CLOSE: //this.DestroyWindow(); this.OnDestroy(EventArgs.Empty); - //return; - break; + return; + //break; case WindowMessage.DESTROY: //this.OnDestroy(EventArgs.Empty);