From a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 17 Jul 2015 03:23:36 +0200 Subject: Bug 1176: Clamp window position and size to 0/0 and screen-size, avoiding out-of screen window positions on BCM VC IV hardware Out of screen window positions on BCM VC IV hardware cause: - Misalignment of self-rendered mouse-pointer / window due to window-offset. - Artifacts when moving the mouse pointer partially out of screen. We still need to add the window position to rel. mouse-pointer position. --- src/newt/native/bcm_vc_iv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/newt/native') diff --git a/src/newt/native/bcm_vc_iv.c b/src/newt/native/bcm_vc_iv.c index 6b1ee3aaf..487941e38 100644 --- a/src/newt/native/bcm_vc_iv.c +++ b/src/newt/native/bcm_vc_iv.c @@ -402,6 +402,8 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_bcm_vc_iv_WindowDriver_CreateWin vc_dispmanx_update_submit_sync( dispman_update ); (*env)->CallVoidMethod(env, obj, visibleChangedID, JNI_FALSE, JNI_TRUE); // FIXME: or defer=true ? + (*env)->CallVoidMethod(env, obj, positionChangedID, JNI_FALSE, x, y); // always report pos-change (clamping) + (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, width, height, JNI_FALSE); // always report size-change (clamping) DBG_PRINT( "BCM.Display Window.Create.X %p, element %p\n", (void*)(intptr_t)dispman_display, (void*)(intptr_t)p->handle); @@ -457,7 +459,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_bcm_vc_iv_WindowDriver_reconfigur (*env)->CallVoidMethod(env, obj, positionChangedID, JNI_FALSE, x, y); } if( sizeChanged ) { - (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, (jint) width, (jint) height, JNI_FALSE); + (*env)->CallVoidMethod(env, obj, sizeChangedID, JNI_FALSE, width, height, JNI_FALSE); } } -- cgit v1.2.3