Petr Hracek 6530f9
diff --git a/src/gtkutil.c b/src/gtkutil.c
Petr Hracek 6530f9
index 44f828c..d434a48 100644
Petr Hracek 6530f9
--- a/src/gtkutil.c
Petr Hracek 6530f9
+++ b/src/gtkutil.c
Petr Hracek 6530f9
@@ -784,6 +784,14 @@ xg_hide_tooltip (FRAME_PTR f)
Petr Hracek 6530f9
     General functions for creating widgets, resizing, events, e.t.c.
Petr Hracek 6530f9
  ***********************************************************************/
Petr Hracek 6530f9
 
Petr Hracek 6530f9
+static void
Petr Hracek 6530f9
+my_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
Petr Hracek 6530f9
+                        const gchar *msg, gpointer user_data)
Petr Hracek 6530f9
+{
Petr Hracek 6530f9
+    if (!strstr (msg, "visible children"))
Petr Hracek 6530f9
+        fprintf (stderr, "XX %s-WARNING **: %s\n", log_domain, msg);
Petr Hracek 6530f9
+}
Petr Hracek 6530f9
+
Petr Hracek 6530f9
 /* Make a geometry string and pass that to GTK.  It seems this is the
Petr Hracek 6530f9
    only way to get geometry position right if the user explicitly
Petr Hracek 6530f9
    asked for a position when starting Emacs.
Petr Hracek 6530f9
@@ -799,6 +807,7 @@ xg_set_geometry (FRAME_PTR f)
Petr Hracek 6530f9
       int top = f->top_pos;
Petr Hracek 6530f9
       int yneg = f->size_hint_flags & YNegative;
Petr Hracek 6530f9
       char geom_str[sizeof "=x--" + 4 * INT_STRLEN_BOUND (int)];
Petr Hracek 6530f9
+      guint id;
Petr Hracek 6530f9
 
Petr Hracek 6530f9
       if (xneg)
Petr Hracek 6530f9
         left = -left;
Petr Hracek 6530f9
@@ -811,9 +820,15 @@ xg_set_geometry (FRAME_PTR f)
Petr Hracek 6530f9
                (xneg ? '-' : '+'), left,
Petr Hracek 6530f9
                (yneg ? '-' : '+'), top);
Petr Hracek 6530f9
 
Petr Hracek 6530f9
+      /* Silence warning about visible children.  */
Petr Hracek 6530f9
+      id = g_log_set_handler ("Gtk", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
Petr Hracek 6530f9
+                              | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
Petr Hracek 6530f9
+
Petr Hracek 6530f9
       if (!gtk_window_parse_geometry (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
Petr Hracek 6530f9
                                       geom_str))
Petr Hracek 6530f9
         fprintf (stderr, "Failed to parse: '%s'\n", geom_str);
Petr Hracek 6530f9
+
Petr Hracek 6530f9
+      g_log_remove_handler ("Gtk", id);
Petr Hracek 6530f9
     }
Petr Hracek 6530f9
 }
Petr Hracek 6530f9