Commit 27ec3aa8 authored by Michael Natterer's avatar Michael Natterer 😴

app: switch off double buffering on the entire offscreen widget tree

Also always return FALSE from the expose and damage event handlers.
parent 6eda16d5
......@@ -235,7 +235,7 @@ gimp_overlay_box_expose (GtkWidget *widget,
for (list = box->children; list; list = g_list_next (list))
{
if (gimp_overlay_child_expose (box, list->data, event))
return TRUE;
return FALSE;
}
}
......@@ -252,7 +252,7 @@ gimp_overlay_box_damage (GtkWidget *widget,
for (list = box->children; list; list = g_list_next (list))
{
if (gimp_overlay_child_damage (box, list->data, event))
return TRUE;
return FALSE;
}
return FALSE;
......@@ -344,6 +344,25 @@ gimp_overlay_box_new (void)
return g_object_new (GIMP_TYPE_OVERLAY_BOX, NULL);
}
static void
unset_double_buffered (GtkWidget *widget)
{
gtk_widget_set_double_buffered (widget, FALSE);
if (GTK_IS_CONTAINER (widget))
{
GList *children = gtk_container_get_children (GTK_CONTAINER (widget));
GList *list;
for (list = children; list; list = g_list_next (list))
{
unset_double_buffered (list->data);
}
g_list_free (children);
}
}
void
gimp_overlay_box_add_child (GimpOverlayBox *box,
GtkWidget *widget,
......@@ -355,7 +374,7 @@ gimp_overlay_box_add_child (GimpOverlayBox *box,
g_return_if_fail (GIMP_IS_OVERLAY_BOX (box));
g_return_if_fail (GTK_IS_WIDGET (widget));
gtk_widget_set_double_buffered (widget, FALSE);
unset_double_buffered (widget);
child = gimp_overlay_child_new (box, widget, xalign, yalign, 0.0, 0.7);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment