container: Be more careful with roots

We were warning if we hit non-container
roots. Instead, call suitable naive api.
This commit is contained in:
Matthias Clasen 2019-12-30 00:26:39 -05:00
parent 9ba184adf7
commit 538efd0cc6

View File

@ -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))