scrolledwindow: Move paint function into expose handler
Also remove the is_drawable() check. It will not be needed once we have the draw vfunc.
This commit is contained in:
@ -1083,9 +1083,9 @@ gtk_scrolled_window_screen_changed (GtkWidget *widget,
|
|||||||
GUINT_TO_POINTER (window_placement_connection));
|
GUINT_TO_POINTER (window_placement_connection));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static gboolean
|
||||||
gtk_scrolled_window_paint (GtkWidget *widget,
|
gtk_scrolled_window_expose (GtkWidget *widget,
|
||||||
GdkRectangle *area)
|
GdkEventExpose *event)
|
||||||
{
|
{
|
||||||
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
|
GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
|
||||||
GtkScrolledWindowPrivate *priv = scrolled_window->priv;
|
GtkScrolledWindowPrivate *priv = scrolled_window->priv;
|
||||||
@ -1127,24 +1127,14 @@ gtk_scrolled_window_paint (GtkWidget *widget,
|
|||||||
gtk_paint_shadow (style,
|
gtk_paint_shadow (style,
|
||||||
gtk_widget_get_window (widget),
|
gtk_widget_get_window (widget),
|
||||||
GTK_STATE_NORMAL, priv->shadow_type,
|
GTK_STATE_NORMAL, priv->shadow_type,
|
||||||
area, widget, "scrolled_window",
|
&event->area, widget, "scrolled_window",
|
||||||
allocation.x + relative_allocation.x,
|
allocation.x + relative_allocation.x,
|
||||||
allocation.y + relative_allocation.y,
|
allocation.y + relative_allocation.y,
|
||||||
relative_allocation.width,
|
relative_allocation.width,
|
||||||
relative_allocation.height);
|
relative_allocation.height);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
GTK_WIDGET_CLASS (gtk_scrolled_window_parent_class)->expose_event (widget, event);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user