diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-12-30 00:26:39 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-12-30 00:30:01 -0500 |
commit | 538efd0cc6aaace3e48fe0e3acd838ba36d372f5 (patch) | |
tree | 2713e25d8afc805b7484cb3b0dc34807ac631d0a /gtk/gtkcontainer.c | |
parent | 9ba184adf7aa599e516fb35daafc79ac7117f0d4 (diff) | |
download | gtk+-538efd0cc6aaace3e48fe0e3acd838ba36d372f5.tar.gz |
container: Be more careful with roots
We were warning if we hit non-container
roots. Instead, call suitable naive api.
Diffstat (limited to 'gtk/gtkcontainer.c')
-rw-r--r-- | gtk/gtkcontainer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c index bbc6968bdf..f3813f2b9d 100644 --- a/gtk/gtkcontainer.c +++ b/gtk/gtkcontainer.c @@ -36,7 +36,8 @@ #include "gtkstylecontextprivate.h" #include "gtktypebuiltins.h" #include "gtkwidgetprivate.h" -//#include "gtkwindowprivate.h" +#include "gtknative.h" +#include "gtkroot.h" #include "a11y/gtkcontaineraccessibleprivate.h" @@ -376,8 +377,10 @@ gtk_container_idle_sizer (GdkFrameClock *clock, { if (GTK_IS_WINDOW (container)) gtk_window_check_resize (GTK_WINDOW (container)); + else if (GTK_IS_ROOT (container)) + gtk_native_check_resize (GTK_NATIVE (container)); else - g_warning ("gtk_container_idle_sizer() called on a non-window"); + g_warning ("gtk_container_idle_sizer() called on a non-native non-window"); } if (!gtk_container_needs_idle_sizer (container)) |