aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-01-05 18:12:43 +0100
committerSven Gothel <[email protected]>2014-01-05 18:12:43 +0100
commit69b5adb37a191e746fa55e495c2d02a942833899 (patch)
tree46e21932e0c5c788f8b1e91c33270ec1ed88cbb5 /src/newt/classes/jogamp
parent20b242387e6c329a2ba6261d39a05ffe9c39c6ab (diff)
NEWT OSX: Add missing NewtCommon_init(env) (duh!) - Issuing NewtCommon_throwNewRuntimeException(..) if given references are of invalid type
Missing NewtCommon_init(env) always lead to a crash when calling NewtCommon_throwNewRuntimeException(..) due to uninitialized clazz instances!
Diffstat (limited to 'src/newt/classes/jogamp')
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java23
1 files changed, 9 insertions, 14 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
index 748604994..edeb69f84 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/WindowDriver.java
@@ -401,9 +401,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
OSXUtil.RunOnMainThread(true, new Runnable() { // waitUntildone due to PointerIconImpl's Lifecycle !
@Override
public void run() {
- if( !setPointerIcon0(getWindowHandle(), piHandle) ) {
- throw new RuntimeException("Failed: "+pi+", "+WindowDriver.this);
- }
+ setPointerIcon0(getWindowHandle(), piHandle);
} } );
} else {
final OffscreenLayerSurface ols = NativeWindowFactory.getOffscreenLayerSurface(this, true);
@@ -430,9 +428,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
OSXUtil.RunOnMainThread(false, new Runnable() {
@Override
public void run() {
- if( !setPointerVisible0(getWindowHandle(), hasFocus(), pointerVisible) ) {
- throw new RuntimeException("Failed");
- }
+ setPointerVisible0(getWindowHandle(), hasFocus(), pointerVisible);
} } );
return true; // setPointerVisible0 always returns true ..
} else {
@@ -456,7 +452,8 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
@Override
protected boolean confinePointerImpl(final boolean confine) {
if( !isOffscreenInstance ) {
- return confinePointer0(getWindowHandle(), confine);
+ confinePointer0(getWindowHandle(), confine);
+ return true;
} // else may need offscreen solution ? FIXME
return false;
}
@@ -464,9 +461,7 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
@Override
protected void warpPointerImpl(final int x, final int y) {
if( !isOffscreenInstance ) {
- if( !warpPointer0(getWindowHandle(), x, y) ) {
- throw new RuntimeException("Failed");
- }
+ warpPointer0(getWindowHandle(), x, y);
} // else may need offscreen solution ? FIXME
}
@@ -621,10 +616,10 @@ public class WindowDriver extends WindowImpl implements MutableSurface, DriverCl
/** Must be called on Main-Thread */
private native void setAlwaysOnTop0(long window, boolean atop);
private static native Object getLocationOnScreen0(long windowHandle, int src_x, int src_y);
- private static native boolean setPointerIcon0(long windowHandle, long handle);
- private static native boolean setPointerVisible0(long windowHandle, boolean hasFocus, boolean visible);
- private static native boolean confinePointer0(long windowHandle, boolean confine);
- private static native boolean warpPointer0(long windowHandle, int x, int y);
+ private static native void setPointerIcon0(long windowHandle, long handle);
+ private static native void setPointerVisible0(long windowHandle, boolean hasFocus, boolean visible);
+ private static native void confinePointer0(long windowHandle, boolean confine);
+ private static native void warpPointer0(long windowHandle, int x, int y);
// Window styles
private static final int NSBorderlessWindowMask = 0;