[gimp] app: switch off double buffering on the entire offscreen widget tree
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: switch off double buffering on the entire offscreen widget tree
- Date: Fri, 18 Jun 2010 11:45:52 +0000 (UTC)
commit 27ec3aa81283431c1ec458c8b41993975acf2d09
Author: Michael Natterer <mitch gimp org>
Date: Fri Jun 18 13:45:03 2010 +0200
app: switch off double buffering on the entire offscreen widget tree
Also always return FALSE from the expose and damage event handlers.
app/widgets/gimpoverlaybox.c | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/app/widgets/gimpoverlaybox.c b/app/widgets/gimpoverlaybox.c
index 98353a9..dda04c0 100644
--- a/app/widgets/gimpoverlaybox.c
+++ b/app/widgets/gimpoverlaybox.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]