mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-30 15:31:34 +00:00
overlay: don't have a custom draw implementation
We can't think with Benjamin of a reason this should be needed, so let's just remove it.
This commit is contained in:
parent
a303547489
commit
c05525127b
@ -480,37 +480,6 @@ gtk_overlay_unmap (GtkWidget *widget)
|
|||||||
GTK_WIDGET_CLASS (gtk_overlay_parent_class)->unmap (widget);
|
GTK_WIDGET_CLASS (gtk_overlay_parent_class)->unmap (widget);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
gtk_overlay_draw (GtkWidget *widget,
|
|
||||||
cairo_t *cr)
|
|
||||||
{
|
|
||||||
GtkOverlay *overlay = GTK_OVERLAY (widget);
|
|
||||||
GtkOverlayPrivate *priv = overlay->priv;
|
|
||||||
GtkOverlayChild *child;
|
|
||||||
GSList *children;
|
|
||||||
|
|
||||||
for (children = priv->children; children; children = children->next)
|
|
||||||
{
|
|
||||||
child = children->data;
|
|
||||||
|
|
||||||
if (gtk_cairo_should_draw_window (cr, child->window))
|
|
||||||
{
|
|
||||||
cairo_save (cr);
|
|
||||||
gtk_cairo_transform_to_window (cr, widget, child->window);
|
|
||||||
gtk_render_background (gtk_widget_get_style_context (widget),
|
|
||||||
cr,
|
|
||||||
0, 0,
|
|
||||||
gdk_window_get_width (child->window),
|
|
||||||
gdk_window_get_height (child->window));
|
|
||||||
cairo_restore (cr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
GTK_WIDGET_CLASS (gtk_overlay_parent_class)->draw (widget, cr);
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_overlay_remove (GtkContainer *container,
|
gtk_overlay_remove (GtkContainer *container,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
@ -580,7 +549,6 @@ gtk_overlay_class_init (GtkOverlayClass *klass)
|
|||||||
widget_class->unrealize = gtk_overlay_unrealize;
|
widget_class->unrealize = gtk_overlay_unrealize;
|
||||||
widget_class->map = gtk_overlay_map;
|
widget_class->map = gtk_overlay_map;
|
||||||
widget_class->unmap = gtk_overlay_unmap;
|
widget_class->unmap = gtk_overlay_unmap;
|
||||||
widget_class->draw = gtk_overlay_draw;
|
|
||||||
|
|
||||||
container_class->remove = gtk_overlay_remove;
|
container_class->remove = gtk_overlay_remove;
|
||||||
container_class->forall = gtk_overlay_forall;
|
container_class->forall = gtk_overlay_forall;
|
||||||
|
Loading…
Reference in New Issue
Block a user