From ab138bfb371ca01b8b2a6e8d909911b2069bb61e Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Wed, 7 Oct 2009 16:18:48 +0000 Subject: [PATCH] Post a close message instead of destroying the window outright, when the user calls the Close() method. Ensures that the user can stop the exit sequence through the IsClosing event. --- Source/OpenTK/Platform/Windows/WinGLNative.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/Windows/WinGLNative.cs b/Source/OpenTK/Platform/Windows/WinGLNative.cs index b121f0d5..684b56d2 100644 --- a/Source/OpenTK/Platform/Windows/WinGLNative.cs +++ b/Source/OpenTK/Platform/Windows/WinGLNative.cs @@ -789,7 +789,7 @@ namespace OpenTK.Platform.Windows public void Close() { - DestroyWindow(); + Functions.PostMessage(window.WindowHandle, WindowMessage.CLOSE, IntPtr.Zero, IntPtr.Zero); } #endregion