View.c: remove some uneccesary allocations which confuse composeUI apps

This commit is contained in:
Julian Winkler
2025-07-23 21:55:07 +02:00
parent 7366475172
commit 9e27cccc0d
2 changed files with 2 additions and 2 deletions

View File

@@ -194,7 +194,7 @@ void atl_ensure_widget_snapshotability(GtkWidget *widget)
/* this clears resize request, which seems to be necessary in some cases */ /* this clears resize request, which seems to be necessary in some cases */
gtk_widget_get_request_mode(widget); gtk_widget_get_request_mode(widget);
gtk_widget_size_allocate(widget, &allocation, gtk_widget_get_baseline(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 */ /* the problematic flags get set all the way up the hierarchy */
GtkWidget *parent = gtk_widget_get_parent(widget); GtkWidget *parent = gtk_widget_get_parent(widget);

View File

@@ -599,7 +599,7 @@ JNIEXPORT void JNICALL Java_android_view_View_native_1layout(JNIEnv *env, jobjec
wrapper->real_width = width; wrapper->real_width = width;
wrapper->real_height = height; wrapper->real_height = height;
if (!wrapper->needs_allocation) if (!wrapper->needs_allocation)
atl_safe_gtk_widget_queue_allocate(widget); gtk_widget_queue_allocate(widget);
} }
if (wrapper->needs_allocation) { if (wrapper->needs_allocation) {
allocation.width = width; allocation.width = width;