diff options
author | Sven Gothel <[email protected]> | 2013-10-07 07:36:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-10-07 07:36:17 +0200 |
commit | c15d33e4f63abe18bbe1ded8125b5ad90e5c6adf (patch) | |
tree | 669567ece041a1ac83692302514830169f11d11c /src/nativewindow/classes/jogamp | |
parent | 8e7f4f42f2ed572e0f794725efec1fb2f81dabf2 (diff) |
NativeWindow/OSX: Fix RunOnThread/RunLater - Properly determine 'forkOnMain' via onMain && ( isOnMain || 0 < delay )
Diffstat (limited to 'src/nativewindow/classes/jogamp')
-rw-r--r-- | src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java index b27affa7e..dc32bd58c 100644 --- a/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java +++ b/src/nativewindow/classes/jogamp/nativewindow/macosx/OSXUtil.java @@ -263,13 +263,13 @@ public class OSXUtil implements ToolkitProperties { } /** - * Run later on current OSX thread. - * + * Run later on .. + * @param onMain if true, run on main-thread, otherwise on the current OSX thread. * @param runnable * @param delay delay to run the runnable in milliseconds */ - public static void RunLater(Runnable runnable, int delay) { - RunLater0(new RunnableTask( runnable, null, true, System.err ), delay); + public static void RunLater(boolean onMain, Runnable runnable, int delay) { + RunLater0(onMain, new RunnableTask( runnable, null, true, System.err ), delay); } private static Runnable _nop = new Runnable() { public void run() {}; }; @@ -363,7 +363,7 @@ public class OSXUtil implements ToolkitProperties { private static native void RemoveCASublayer0(long rootCALayer, long subCALayer); private static native void DestroyCALayer0(long caLayer); private static native void RunOnMainThread0(Runnable runnable); - private static native void RunLater0(Runnable runnable, int delay); + private static native void RunLater0(boolean onMain, Runnable runnable, int delay); private static native boolean IsMainThread0(); private static native int GetScreenRefreshRate0(int scrn_idx); } |