Close() method now calls implementation.Close() instead of Dispose() directly.
This commit is contained in:
parent
3095504dd1
commit
9975aab0f9
1 changed files with 12 additions and 7 deletions
|
@ -143,11 +143,12 @@ namespace OpenTK
|
|||
#region Close
|
||||
|
||||
/// <summary>
|
||||
/// Closes the NativeWindow. Equivalent to calling <see cref="OpenTK.NativeWindow.Dispose()"/>.
|
||||
/// Closes the NativeWindow.
|
||||
/// </summary>
|
||||
public void Close()
|
||||
{
|
||||
Dispose();
|
||||
EnsureUndisposed();
|
||||
implementation.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -616,10 +617,14 @@ namespace OpenTK
|
|||
/// Releases all non-managed resources belonging to this NativeWindow.
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
implementation.Dispose();
|
||||
disposed = true;
|
||||
GC.SuppressFinalize(this);
|
||||
|
||||
disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -787,7 +792,7 @@ namespace OpenTK
|
|||
|
||||
if (Closing != null) Closing(this, e);
|
||||
|
||||
if (!e.Cancel) Close();
|
||||
//if (!e.Cancel) Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -878,7 +883,7 @@ namespace OpenTK
|
|||
{
|
||||
OnWindowBorderChanged(e);
|
||||
|
||||
if (WindowBorderChanged != null) WindowBorderChanged(this, e); // TODO: This was raised with EventArgs.Empty. Special reason?
|
||||
if (WindowBorderChanged != null) WindowBorderChanged(this, e); // TODO: This was closed with EventArgs.Empty. Special reason?
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue