* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
+
+/*
+ * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
+ * file for a list of people on the GTK+ Team. See the ChangeLog
+ * files for a list of changes. These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
#include "gtkbin.h"
g_return_if_fail (GTK_IS_BIN (widget));
bin = GTK_BIN (widget);
-
- if (bin->child && GTK_WIDGET_VISIBLE (bin->child) &&
- gtk_widget_intersect (bin->child, area, &child_area))
- gtk_widget_draw (bin->child, &child_area);
+
+ if (GTK_WIDGET_DRAWABLE (bin))
+ {
+ if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
+ gtk_widget_intersect (bin->child, area, &child_area))
+ gtk_widget_draw (bin->child, &child_area);
+ }
}
static gint
bin = GTK_BIN (widget);
child_event = *event;
- if (bin->child &&
+ if (bin->child && GTK_WIDGET_DRAWABLE (bin->child) &&
GTK_WIDGET_NO_WINDOW (bin->child) &&
gtk_widget_intersect (bin->child, &event->area, &child_event.area))
gtk_widget_event (bin->child, (GdkEvent*) &child_event);
gtk_widget_set_parent (child, GTK_WIDGET (bin));
bin->child = child;
- if (GTK_WIDGET_VISIBLE (child->parent))
+ if (GTK_WIDGET_REALIZED (child->parent))
+ gtk_widget_realize (child);
+
+ if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child))
{
- if (GTK_WIDGET_REALIZED (child->parent) &&
- !GTK_WIDGET_REALIZED (child))
- gtk_widget_realize (child);
-
- if (GTK_WIDGET_MAPPED (child->parent) &&
- !GTK_WIDGET_MAPPED (child))
+ if (GTK_WIDGET_MAPPED (child->parent))
gtk_widget_map (child);
+
+ gtk_widget_queue_resize (child);
}
-
- if (GTK_WIDGET_VISIBLE (child) && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (child);
}
static void