summaryrefslogtreecommitdiffstats
path: root/src/newt/native/KDWindow.c
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-23 06:26:47 +0100
committerSven Gothel <[email protected]>2010-12-23 06:26:47 +0100
commite7778124162aef7004e040dded5de1eaf5e1ece4 (patch)
treeb750b24a7d3e5c3e008701760af7e9b74b43f4b4 /src/newt/native/KDWindow.c
parent1c2a11a54949188d6704558f7fa38ecf8e811118 (diff)
NEWT: Add WindowListener.windowDestroyed() ; Remove WindowImpl.windowDestroyed()
Add WindowListener.windowDestroyed() To expose a proper window lifecycle, ie destroy-notify and destroyed, this notification is added. This will be used at least in unit tests, where we verify destruction. Remove WindowImpl.windowDestroyed(): This native hook (planned to be called by native destroy notification) is unreliable or not supported for all platforms. NEWT relies on the pre destroy native hooks and handles the final destroy notification itself.
Diffstat (limited to 'src/newt/native/KDWindow.c')
-rw-r--r--src/newt/native/KDWindow.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c
index 33af4d963..50ad22b5a 100644
--- a/src/newt/native/KDWindow.c
+++ b/src/newt/native/KDWindow.c
@@ -94,7 +94,6 @@ static jmethodID windowCreatedID = NULL;
static jmethodID sizeChangedID = NULL;
static jmethodID visibleChangedID = NULL;
static jmethodID windowDestroyNotifyID = NULL;
-static jmethodID windowDestroyedID = NULL;
static jmethodID sendMouseEventID = NULL;
static jmethodID sendKeyEventID = NULL;
@@ -137,8 +136,6 @@ JNIEXPORT void JNICALL Java_com_jogamp_newt_impl_opengl_kd_KDDisplay_DispatchMes
{
DBG_PRINT( "event window close : src: %p\n", userData);
(*env)->CallVoidMethod(env, javaWindow, windowDestroyNotifyID);
- // Called by Window.java: DestroyWindow(wnd);
- // (*env)->CallVoidMethod(env, javaWindow, windowDestroyedID);
}
break;
case KD_EVENT_WINDOWPROPERTY_CHANGE:
@@ -213,14 +210,12 @@ JNIEXPORT jboolean JNICALL Java_com_jogamp_newt_impl_opengl_kd_KDWindow_initIDs
sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(IIZ)V");
visibleChangedID = (*env)->GetMethodID(env, clazz, "visibleChanged", "(Z)V");
windowDestroyNotifyID = (*env)->GetMethodID(env, clazz, "windowDestroyNotify", "()V");
- windowDestroyedID = (*env)->GetMethodID(env, clazz, "windowDestroyed", "()V");
sendMouseEventID = (*env)->GetMethodID(env, clazz, "sendMouseEvent", "(IIIIII)V");
sendKeyEventID = (*env)->GetMethodID(env, clazz, "sendKeyEvent", "(IIIC)V");
if (windowCreatedID == NULL ||
sizeChangedID == NULL ||
visibleChangedID == NULL ||
windowDestroyNotifyID == NULL ||
- windowDestroyedID == NULL ||
sendMouseEventID == NULL ||
sendKeyEventID == NULL) {
DBG_PRINT( "initIDs failed\n" );