From 9e27cccc0dcdfc7d6a9e1a54535584565d21f655 Mon Sep 17 00:00:00 2001 From: Julian Winkler Date: Wed, 23 Jul 2025 21:55:07 +0200 Subject: [PATCH] View.c: remove some uneccesary allocations which confuse composeUI apps --- src/api-impl-jni/util.c | 2 +- src/api-impl-jni/views/android_view_View.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api-impl-jni/util.c b/src/api-impl-jni/util.c index 0c7e0509..39f16fdb 100644 --- a/src/api-impl-jni/util.c +++ b/src/api-impl-jni/util.c @@ -194,7 +194,7 @@ void atl_ensure_widget_snapshotability(GtkWidget *widget) /* this clears resize request, which seems to be necessary in some cases */ gtk_widget_get_request_mode(widget); gtk_widget_size_allocate(widget, &allocation, gtk_widget_get_baseline(widget)); - gtk_widget_add_tick_callback(widget, queue_queue_allocate, NULL, NULL); + // maybe we should schedule a call to queue_queue_allocate, but that causes problems in composeUI apps. /* the problematic flags get set all the way up the hierarchy */ GtkWidget *parent = gtk_widget_get_parent(widget); diff --git a/src/api-impl-jni/views/android_view_View.c b/src/api-impl-jni/views/android_view_View.c index 71145d7e..3b766d2d 100644 --- a/src/api-impl-jni/views/android_view_View.c +++ b/src/api-impl-jni/views/android_view_View.c @@ -599,7 +599,7 @@ JNIEXPORT void JNICALL Java_android_view_View_native_1layout(JNIEnv *env, jobjec wrapper->real_width = width; wrapper->real_height = height; if (!wrapper->needs_allocation) - atl_safe_gtk_widget_queue_allocate(widget); + gtk_widget_queue_allocate(widget); } if (wrapper->needs_allocation) { allocation.width = width;