summaryrefslogtreecommitdiffstats
path: root/src/newt/native/MacWindow.m
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/native/MacWindow.m
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/native/MacWindow.m')
-rw-r--r--src/newt/native/MacWindow.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m
index c528ebb64..1dcfacb6d 100644
--- a/src/newt/native/MacWindow.m
+++ b/src/newt/native/MacWindow.m
@@ -1043,10 +1043,11 @@ JNIEXPORT jobject JNICALL Java_jogamp_newt_driver_macosx_MacWindow_getLocationOn
* Signature: (JZ)Z
*/
JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setPointerVisible0
- (JNIEnv *env, jclass clazz, jlong window, jboolean mouseVisible)
+ (JNIEnv *env, jclass clazz, jlong window, jboolean hasFocus, jboolean mouseVisible)
{
NewtMacWindow *mWin = (NewtMacWindow*) ((intptr_t) window);
- [mWin setMouseVisible: ( JNI_TRUE == mouseVisible ) ? YES : NO];
+ [mWin setMouseVisible: ( JNI_TRUE == mouseVisible ) ? YES : NO
+ hasFocus: ( JNI_TRUE == hasFocus ) ? YES : NO];
return JNI_TRUE;
}