diff options
author | Sven Gothel <[email protected]> | 2009-03-16 15:38:36 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2009-03-16 15:38:36 +0000 |
commit | 4e1e08de62a4e3067ea66b5c8f0ded568d2f46b9 (patch) | |
tree | bd34ceec66175d8a65464873bed30ec3e584e019 /src/newt/native/NewtMacWindow.m | |
parent | 19b79a8fb8aca48864646d1c22808020bbf155cc (diff) |
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
Diffstat (limited to 'src/newt/native/NewtMacWindow.m')
-rw-r--r-- | src/newt/native/NewtMacWindow.m | 11 |
1 files changed, 7 insertions, 4 deletions
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 |