Description: Create the child window at the correct position when the GtkPaned
 only has a single child
Author: Chris Coulson <chris.coulson@canonical.com>
Bug-Ubuntu: https://launchpad.net/bugs/804435
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659241

Index: gtk+3.0-3.1.18/gtk/gtkpaned.c
===================================================================
--- gtk+3.0-3.1.18.orig/gtk/gtkpaned.c	2011-09-16 12:55:20.565346386 +0100
+++ gtk+3.0-3.1.18/gtk/gtkpaned.c	2011-09-16 13:34:36.805304519 +0100
@@ -1291,12 +1291,14 @@
 
       gtk_widget_get_allocation (widget, &allocation);
       if (priv->orientation == GTK_ORIENTATION_HORIZONTAL &&
-          child == priv->child2)
+          child == priv->child2 && priv->child1 &&
+          gtk_widget_get_visible (priv->child1))
         attributes.x = priv->handle_pos.x + handle_size;
       else
         attributes.x = allocation.x;
       if (priv->orientation == GTK_ORIENTATION_VERTICAL &&
-          child == priv->child2)
+          child == priv->child2 && priv->child1 &&
+          gtk_widget_get_visible (priv->child1))
         attributes.y = priv->handle_pos.y + handle_size;
       else
         attributes.y = allocation.y;
