add support for the boneheaded method of receiving input events that is used by NativeActivity apps

currently, our "not-actually-a-queue" implementation is quite ugly,
hopefully it might be possible to make it look somewhat sane while
not needing to make it as much of a queue as it is on android
This commit is contained in:
Mis012
2022-11-11 19:18:21 +01:00
parent 231ac88dbd
commit 33b4515cb9
12 changed files with 291 additions and 36 deletions

View File

@@ -309,6 +309,15 @@ static void open(GtkApplication *app, GFile** files, gint nfiles, const gchar* h
(*env)->CallVoidMethod(env, handle_cache.apk_main_activity.object, handle_cache.apk_main_activity.onWindowFocusChanged, true);
if((*env)->ExceptionCheck(env))
(*env)->ExceptionDescribe(env);
jobject input_queue_callback = g_object_get_data(G_OBJECT(window), "input_queue_callback");
if(input_queue_callback) {
jobject input_queue = g_object_get_data(G_OBJECT(window), "input_queue");
(*env)->CallVoidMethod(env, input_queue_callback, handle_cache.input_queue_callback.onInputQueueCreated, input_queue);
if((*env)->ExceptionCheck(env))
(*env)->ExceptionDescribe(env);
}
}
static void activate(GtkApplication *app, struct jni_callback_data *d)