[gimp/soc-2010-cage] app: don't draw any background if the overlay child is app-paintable
- From: Michael Muré <mmure src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/soc-2010-cage] app: don't draw any background if the overlay child is app-paintable
- Date: Wed, 30 Jun 2010 22:09:58 +0000 (UTC)
commit 0a7c5168f5525056f70174fa047bddb2ec6b99e6
Author: Michael Natterer <mitch gimp org>
Date: Fri Jun 18 13:46:39 2010 +0200
app: don't draw any background if the overlay child is app-paintable
instead of never drawing a background. Doesn't make any difference,
but makes GimpOverlayBox a more general container. Also, the offscreen
GdkWindow doesn't need any event but GDK_EXPOSURE_MASK.
app/widgets/gimpoverlaychild.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/app/widgets/gimpoverlaychild.c b/app/widgets/gimpoverlaychild.c
index a344cdd..8c322f6 100644
--- a/app/widgets/gimpoverlaychild.c
+++ b/app/widgets/gimpoverlaychild.c
@@ -166,7 +166,7 @@ gimp_overlay_child_realize (GimpOverlayBox *box,
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual (child->widget);
attributes.colormap = gtk_widget_get_colormap (child->widget);
- attributes.event_mask = gtk_widget_get_events (child->widget) | GDK_EXPOSURE_MASK;
+ attributes.event_mask = GDK_EXPOSURE_MASK;
attributes.cursor = gdk_cursor_new_for_display (display, GDK_LEFT_PTR);
attributes_mask = (GDK_WA_X |
@@ -352,13 +352,12 @@ gimp_overlay_child_expose (GimpOverlayBox *box,
}
else if (event->window == child->window)
{
-#if 0
- gtk_paint_flat_box (gtk_widget_get_style (child->widget),
- event->window,
- GTK_STATE_NORMAL, GTK_SHADOW_NONE,
- &event->area, widget, NULL,
- 0, 0, -1, -1);
-#endif
+ if (! gtk_widget_get_app_paintable (child->widget))
+ gtk_paint_flat_box (gtk_widget_get_style (child->widget),
+ event->window,
+ GTK_STATE_NORMAL, GTK_SHADOW_NONE,
+ &event->area, widget, NULL,
+ 0, 0, -1, -1);
gtk_container_propagate_expose (GTK_CONTAINER (widget),
child->widget,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]