Those warnings usually come from
https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c?h= gtk-3-22#n9744
The output you're seeing is from gtkwidget.c and inside a
#ifdef G_ENABLE_DEBUG guard. G_ENABLE_DEBUG gets defined when
--disable-debug is NOT passed to the GTK+ build. A few of the warnings
in gtk+ have been put into #ifdef G_ENABLE_CONSISTENCY_CHECKS guards
instead, which is only defined when --enable-debug is explicitly passed
to the build.
If you can come up with a patch, I'm sure it would be merged.