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
View.c: remove some uneccesary allocations which confuse composeUI apps
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user