You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
OnTouchListener: attach event controllers to WrapperWidget
otherwise, the touch event positions would depend on the scroll offset. This fixes the glitchy vertical scrolling in ViewPager
This commit is contained in:
@@ -170,8 +170,7 @@ void wrapper_widget_set_jobject(WrapperWidget *wrapper, JNIEnv *env, jobject job
|
||||
|
||||
jmethodID ontouchevent_method = _METHOD(_CLASS(jobj), "onTouchEvent", "(Landroid/view/MotionEvent;)Z");
|
||||
if (ontouchevent_method != handle_cache.view.onTouchEvent) {
|
||||
/* use wrapper->child since the jobject may not have the "widget" variable set yet */
|
||||
_setOnTouchListener(env, jobj, wrapper->child, NULL);
|
||||
_setOnTouchListener(env, jobj, GTK_WIDGET(wrapper), NULL);
|
||||
}
|
||||
|
||||
jmethodID computeScroll_method = _METHOD(_CLASS(jobj), "computeScroll", "()V");
|
||||
|
||||
Reference in New Issue
Block a user