mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
Merge branch 'master' of github.com:UnknownShadow200/ClassicalSharp
This commit is contained in:
commit
81d6ed5118
@ -326,8 +326,10 @@ namespace OpenTK.Platform.X11 {
|
|||||||
|
|
||||||
if (!ce.Cancel) {
|
if (!ce.Cancel) {
|
||||||
isExiting = true;
|
isExiting = true;
|
||||||
Debug.Print("Destroying window.");
|
|
||||||
API.XDestroyWindow(window.Display, window.WindowHandle);
|
DestroyWindow();
|
||||||
|
if (Closed != null)
|
||||||
|
Closed(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
@ -335,8 +337,6 @@ namespace OpenTK.Platform.X11 {
|
|||||||
Debug.Print("Window destroyed");
|
Debug.Print("Window destroyed");
|
||||||
exists = false;
|
exists = false;
|
||||||
|
|
||||||
if (Closed != null)
|
|
||||||
Closed(this, EventArgs.Empty);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case XEventName.ConfigureNotify:
|
case XEventName.ConfigureNotify:
|
||||||
@ -766,7 +766,9 @@ namespace OpenTK.Platform.X11 {
|
|||||||
|
|
||||||
public void DestroyWindow() {
|
public void DestroyWindow() {
|
||||||
Debug.Print("X11GLNative shutdown sequence initiated.");
|
Debug.Print("X11GLNative shutdown sequence initiated.");
|
||||||
|
API.XSync(window.Display, true);
|
||||||
API.XDestroyWindow(window.Display, window.WindowHandle);
|
API.XDestroyWindow(window.Display, window.WindowHandle);
|
||||||
|
exists = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Point PointToClient(Point point) {
|
public Point PointToClient(Point point) {
|
||||||
@ -793,10 +795,7 @@ namespace OpenTK.Platform.X11 {
|
|||||||
if (manuallyCalled) {
|
if (manuallyCalled) {
|
||||||
if (window != null && window.WindowHandle != IntPtr.Zero) {
|
if (window != null && window.WindowHandle != IntPtr.Zero) {
|
||||||
if (Exists) {
|
if (Exists) {
|
||||||
API.XDestroyWindow(window.Display, window.WindowHandle);
|
DestroyWindow();
|
||||||
|
|
||||||
while (Exists)
|
|
||||||
ProcessEvents();
|
|
||||||
}
|
}
|
||||||
window.Dispose();
|
window.Dispose();
|
||||||
window = null;
|
window = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user