api-impl-jni: make invalidate() work inside the draw callback

this lets us remove the tick callback, and only call onDraw
when it's actually necessary
This commit is contained in:
Mis012
2023-10-31 23:14:47 +01:00
parent bcd588446d
commit 065fd96308
3 changed files with 26 additions and 9 deletions

View File

@@ -267,7 +267,7 @@ JNIEXPORT jlong JNICALL Java_android_view_View_native_1constructor(JNIEnv *env,
JNIEXPORT void JNICALL Java_android_view_View_nativeInvalidate(JNIEnv *env, jclass class, jlong widget_ptr) {
GtkWidget *widget = GTK_WIDGET(_PTR(widget_ptr));
gtk_widget_queue_draw(gtk_widget_get_parent(widget));
wrapper_widget_queue_draw(WRAPPER_WIDGET(gtk_widget_get_parent(widget)));
}
JNIEXPORT void JNICALL Java_android_view_View_native_1destructor(JNIEnv *env, jobject this, jlong widget_ptr)