[gtk+] scrolledwindow: Move paint function into expose handler
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] scrolledwindow: Move paint function into expose handler
- Date: Sun, 26 Sep 2010 13:37:18 +0000 (UTC)
commit 5eabd8c6fa24003473ce0479f51454dcfc30a0d1
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 7 16:59:32 2010 +0200
scrolledwindow: Move paint function into expose handler
Also remove the is_drawable() check. It will not be needed once we have
the draw vfunc.
gtk/gtkscrolledwindow.c | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index c23b771..dcbd15c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1083,9 +1083,9 @@ gtk_scrolled_window_screen_changed (GtkWidget *widget,
GUINT_TO_POINTER (window_placement_connection));
}
-static void
-gtk_scrolled_window_paint (GtkWidget *widget,
- GdkRectangle *area)
+static gboolean
+gtk_scrolled_window_expose (GtkWidget *widget,
+ GdkEventExpose *event)
{
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
GtkScrolledWindowPrivate *priv = scrolled_window->priv;
@@ -1127,24 +1127,14 @@ gtk_scrolled_window_paint (GtkWidget *widget,
gtk_paint_shadow (style,
gtk_widget_get_window (widget),
GTK_STATE_NORMAL, priv->shadow_type,
- area, widget, "scrolled_window",
+ &event->area, widget, "scrolled_window",
allocation.x + relative_allocation.x,
allocation.y + relative_allocation.y,
relative_allocation.width,
relative_allocation.height);
}
-}
-
-static gboolean
-gtk_scrolled_window_expose (GtkWidget *widget,
- GdkEventExpose *event)
-{
- if (gtk_widget_is_drawable (widget))
- {
- gtk_scrolled_window_paint (widget, &event->area);
- GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->expose_event (widget, event);
- }
+ GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->expose_event (widget, event);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]