From 4e1e08de62a4e3067ea66b5c8f0ded568d2f46b9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 16 Mar 2009 15:38:36 +0000 Subject: repair git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1875 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/newt/native/NewtMacWindow.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/newt/native/NewtMacWindow.m') diff --git a/src/newt/native/NewtMacWindow.m b/src/newt/native/NewtMacWindow.m index 5809c16b0..43f9b271e 100644 --- a/src/newt/native/NewtMacWindow.m +++ b/src/newt/native/NewtMacWindow.m @@ -40,7 +40,8 @@ static jmethodID sendMouseEventID = NULL; static jmethodID sendKeyEventID = NULL; static jmethodID sizeChangedID = NULL; static jmethodID positionChangedID = NULL; -static jmethodID windowClosedID = NULL; +static jmethodID windowDestroyNotifyID = NULL; +static jmethodID windowDestroyedID = NULL; // This is set while messages are being dispatched and cleared afterward static JNIEnv* env = NULL; @@ -53,8 +54,9 @@ static JNIEnv* env = NULL; sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V"); sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(II)V"); positionChangedID = (*env)->GetMethodID(env, clazz, "positionChanged", "(II)V"); - windowClosedID = (*env)->GetMethodID(env, clazz, "windowClosed", "()V"); - if (sendMouseEventID && sendKeyEventID && sizeChangedID && positionChangedID && windowClosedID) { + windowDestroyNotifyID = (*env)->GetMethodID(env, clazz, "windowDestroyNotify", "()V"); + windowDestroyedID = (*env)->GetMethodID(env, clazz, "windowDestroyed", "()V"); + if (sendMouseEventID && sendKeyEventID && sizeChangedID && positionChangedID && windowDestroyedID && windowDestroyNotifyID) { return YES; } return NO; @@ -287,7 +289,8 @@ static jint mods2JavaMods(NSUInteger mods) return; } - (*env)->CallVoidMethod(env, javaWindowObject, windowClosedID); + (*env)->CallVoidMethod(env, javaWindowObject, windowDestroyNotifyID); + // Will be called by Window.java (*env)->CallVoidMethod(env, javaWindowObject, windowDestroyedID); } @end -- cgit v1.2.3