summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-01-16 10:56:59 +0100
committerSven Gothel <[email protected]>2012-01-16 10:56:59 +0100
commitf5c8cdad92687782184122fecc341258a6283d89 (patch)
tree9f243409269cba56335d331e0256024f5fdea157 /src/newt/classes
parent3154801a0054de2dba775902f3da04c96638bb27 (diff)
NEWT/OSX Pointer Invisible Fix: 10.6.* responder declarations & test focus/isInside
On OS X 10.6.8 the lack of responder method declarations (mouseEntered, ..) lead to ignore the impl. callbacks. 'isMouseInside' cannot rely on 'mouseExit'/'mouseEntered' when setMouseInvisible() is being called, deduce it manually. focusLost == mouseExit (OS X behavior), hence focusGained needs to set mouse invisible/visible in case it's requested.
Diffstat (limited to 'src/newt/classes')
-rw-r--r--src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
index 75a3cf6d5..f879ad86c 100644
--- a/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
+++ b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java
@@ -271,7 +271,7 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
@Override
protected boolean setPointerVisibleImpl(final boolean pointerVisible) {
if( !isOffscreenInstance ) {
- return setPointerVisible0(getWindowHandle(), pointerVisible);
+ return setPointerVisible0(getWindowHandle(), hasFocus(), pointerVisible);
} // else may need offscreen solution ? FIXME
return false;
}
@@ -381,7 +381,7 @@ public class MacWindow extends WindowImpl implements SurfaceChangeable, DriverCl
private native void setFrameTopLeftPoint0(long parentWindowHandle, long window, int x, int y);
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 setPointerVisible0(long windowHandle, boolean visible);
+ private static native boolean setPointerVisible0(long windowHandle, boolean hasFocus, boolean visible);
private static native boolean confinePointer0(long windowHandle, boolean confine);
private static native void warpPointer0(long windowHandle, int x, int y);