diff options
author | Sven Gothel <[email protected]> | 2015-07-17 03:23:36 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-07-17 03:23:36 +0200 |
commit | a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa (patch) | |
tree | 3aa3082f9855762aedb58952e1dbf72a0554ce8b /src/newt/native | |
parent | 0b62f343f5c2ca74d10d86c435099ce0e0ab89db (diff) |
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.
Diffstat (limited to 'src/newt/native')
-rw-r--r-- | src/newt/native/bcm_vc_iv.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); } } |