diff options
author | Benjamin Otte <otte@redhat.com> | 2014-02-25 14:51:16 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-02-28 03:08:11 +0100 |
commit | e2a83cae0f89945cc24464c21a965fc42affe96a (patch) | |
tree | a7c9e0dcc06387df95620dc428530217bcd4037e /gtk/gtkfixed.c | |
parent | 0f212b5fb7f311ac54e98f8bd86874b5ac86a1e1 (diff) | |
download | gtk+-e2a83cae0f89945cc24464c21a965fc42affe96a.tar.gz |
fixed: Fix drawing order
Restore the drawing order in GtkFixed to what it was in 3.8. With the
GDK drawing changes this will not be correct in some cases (un-windowed
children can now overlap windowed children and native children overlap
everything), but fixes Eclipse drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=725089
Diffstat (limited to 'gtk/gtkfixed.c')
-rw-r--r-- | gtk/gtkfixed.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gtk/gtkfixed.c b/gtk/gtkfixed.c index 82198a13b7..7f6573ee45 100644 --- a/gtk/gtkfixed.c +++ b/gtk/gtkfixed.c @@ -94,6 +94,8 @@ static void gtk_fixed_get_preferred_height (GtkWidget *widget, gint *natural); static void gtk_fixed_size_allocate (GtkWidget *widget, GtkAllocation *allocation); +static gboolean gtk_fixed_draw (GtkWidget *widget, + cairo_t *cr); static void gtk_fixed_add (GtkContainer *container, GtkWidget *widget); static void gtk_fixed_remove (GtkContainer *container, @@ -130,6 +132,7 @@ gtk_fixed_class_init (GtkFixedClass *class) widget_class->get_preferred_width = gtk_fixed_get_preferred_width; widget_class->get_preferred_height = gtk_fixed_get_preferred_height; widget_class->size_allocate = gtk_fixed_size_allocate; + widget_class->draw = gtk_fixed_draw; container_class->add = gtk_fixed_add; container_class->remove = gtk_fixed_remove; @@ -540,3 +543,27 @@ gtk_fixed_forall (GtkContainer *container, (* callback) (child->widget, callback_data); } } + +static gboolean +gtk_fixed_draw (GtkWidget *widget, + cairo_t *cr) +{ + GtkFixed *fixed = GTK_FIXED (widget); + GtkFixedPrivate *priv = fixed->priv; + GtkFixedChild *child; + GList *list; + + for (list = priv->children; + list; + list = list->next) + { + child = list->data; + + gtk_container_propagate_draw (GTK_CONTAINER (fixed), + child->widget, + cr); + } + + return FALSE; +} + |