[gtk+/rendering-cleanup-next: 72/154] eventbox: Merge paint function into expose function
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 72/154] eventbox: Merge paint function into expose function
- Date: Tue, 14 Sep 2010 15:52:43 +0000 (UTC)
commit 85dd6c5363e6e7a52fa11a1961c7fa133e862091
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 7 19:29:03 2010 +0200
eventbox: Merge paint function into expose function
gtk/gtkeventbox.c | 28 ++++++++--------------------
1 files changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index cbc5be5..b2461fc 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -53,8 +53,6 @@ static void gtk_event_box_size_request (GtkWidget *widget,
GtkRequisition *requisition);
static void gtk_event_box_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_event_box_paint (GtkWidget *widget,
- GdkRectangle *area);
static gboolean gtk_event_box_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_event_box_set_property (GObject *object,
@@ -559,30 +557,20 @@ gtk_event_box_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (child, &child_allocation);
}
-static void
-gtk_event_box_paint (GtkWidget *widget,
- GdkRectangle *area)
+static gboolean
+gtk_event_box_expose (GtkWidget *widget,
+ GdkEventExpose *event)
{
- if (!gtk_widget_get_app_paintable (widget))
+ if (gtk_widget_get_has_window (widget) &&
+ !gtk_widget_get_app_paintable (widget))
gtk_paint_flat_box (gtk_widget_get_style (widget),
gtk_widget_get_window (widget),
gtk_widget_get_state (widget),
GTK_SHADOW_NONE,
- area, widget, "eventbox",
+ &event->area, widget, "eventbox",
0, 0, -1, -1);
-}
-
-static gboolean
-gtk_event_box_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- if (gtk_widget_is_drawable (widget))
- {
- if (gtk_widget_get_has_window (widget))
- gtk_event_box_paint (widget, &event->area);
-
- GTK_WIDGET_CLASS (gtk_event_box_parent_class)->expose_event (widget, event);
- }
+
+ GTK_WIDGET_CLASS (gtk_event_box_parent_class)->expose_event (widget, event);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]