summaryrefslogtreecommitdiffstats
path: root/src/newt/native/NewtMacWindow.m
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-04-09 19:46:35 +0200
committerSven Gothel <[email protected]>2010-04-09 19:46:35 +0200
commite8f4dc96c037b4465ad1db9062249f80508117fd (patch)
tree7c8bb37efd27714691ef51dd23370c2cc52ce034 /src/newt/native/NewtMacWindow.m
parenta9eaf11b0d168db049bafc24260d6c0b4a000071 (diff)
Fix NEWT Window destroy/close race condition,
where a programatic window.destroy() call from thread 1 triggers a destroy() call via the native windowing toolkit via windowDestroyNotify(). It has to be checked/locked if a destroy is in progress, otherwise they could deadlock (OSX and Win32).
Diffstat (limited to 'src/newt/native/NewtMacWindow.m')
-rwxr-xr-xsrc/newt/native/NewtMacWindow.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newt/native/NewtMacWindow.m b/src/newt/native/NewtMacWindow.m
index 146c04de1..3d8d32a40 100755
--- a/src/newt/native/NewtMacWindow.m
+++ b/src/newt/native/NewtMacWindow.m
@@ -441,7 +441,7 @@ static jint mods2JavaMods(NSUInteger mods)
}
(*env)->CallVoidMethod(env, javaWindowObject, windowDestroyNotifyID);
- // Will be called by Window.java (*env)->CallVoidMethod(env, javaWindowObject, windowDestroyedID);
+ (*env)->CallVoidMethod(env, javaWindowObject, windowDestroyedID); // No OSX hook for DidClose, so do it here
// EOL ..
(*env)->DeleteGlobalRef(env, javaWindowObject);