summaryrefslogtreecommitdiff
path: root/gtk/gtkoverlaylayout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-06-10 18:01:59 +0000
committerMatthias Clasen <mclasen@redhat.com>2019-06-11 14:52:30 -0400
commit21a5c7f0eb39066a64e92007ac7c1466629d0af6 (patch)
treebab22695373e2fce9aa6acc40e5924092081bcb0 /gtk/gtkoverlaylayout.c
parentf03c7c379a7ddb8458fe13954e0979b9afd52841 (diff)
downloadgtk+-21a5c7f0eb39066a64e92007ac7c1466629d0af6.tar.gz
layout managers: Handle native children
Add a convenience api to skip children that should not be included in the layout, and call gtk_native_check_resize on all native children outside of the vfunc.
Diffstat (limited to 'gtk/gtkoverlaylayout.c')
-rw-r--r--gtk/gtkoverlaylayout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/gtkoverlaylayout.c b/gtk/gtkoverlaylayout.c
index 4fa4f12dd8..e0c65ba68a 100644
--- a/gtk/gtkoverlaylayout.c
+++ b/gtk/gtkoverlaylayout.c
@@ -252,6 +252,9 @@ gtk_overlay_layout_measure (GtkLayoutManager *layout_manager,
child != NULL;
child = _gtk_widget_get_next_sibling (child))
{
+ if (!gtk_widget_should_layout (child))
+ continue;
+
child_info = GTK_OVERLAY_LAYOUT_CHILD (gtk_layout_manager_get_layout_child (layout_manager, child));
if (child == main_widget || child_info->measure)
@@ -376,7 +379,7 @@ gtk_overlay_child_allocate (GtkOverlay *overlay,
{
GtkAllocation child_allocation;
- if (!gtk_widget_get_visible (widget))
+ if (!gtk_widget_should_layout (widget))
return;
gtk_overlay_compute_child_allocation (overlay, widget, child, &child_allocation);