diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 6cb355b..94b00f3 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -3093,6 +3093,9 @@ gtk_window_set_transient_for  (GtkWindow *window,
 
   priv = window->priv;
 
+  if (gtk_widget_get_realized (GTK_WIDGET (window)))
+    g_warning ("gtk_window_set_transient_for called on a realized window. This is discouraged.");
+
   if (priv->transient_parent)
     {
       if (gtk_widget_get_realized (GTK_WIDGET (window)) &&
