[gtk+/rendering-cleanup-next: 67/203] viewport: Pass sizes explicitly to paint functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/rendering-cleanup-next: 67/203] viewport: Pass sizes explicitly to paint functions
- Date: Thu, 23 Sep 2010 10:36:44 +0000 (UTC)
commit 652c4013fd6333a446956b06001e469b19ab1893
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 7 16:48:29 2010 +0200
viewport: Pass sizes explicitly to paint functions
gtk/gtkviewport.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 4e67c1c..4fc5391 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -771,22 +771,27 @@ gtk_viewport_expose (GtkWidget *widget,
{
GtkViewport *viewport = GTK_VIEWPORT (widget);
GtkViewportPrivate *priv = viewport->priv;
+ int width, height;
if (event->window == gtk_widget_get_window (widget))
{
+ gdk_drawable_get_size (gtk_widget_get_window (widget),
+ &width, &height);
gtk_paint_shadow (gtk_widget_get_style (widget),
gtk_widget_get_window (widget),
GTK_STATE_NORMAL, priv->shadow_type,
&event->area, widget, "viewport",
- 0, 0, -1, -1);
+ 0, 0, width, height);
}
if (event->window == priv->bin_window)
{
+ gdk_drawable_get_size (priv->bin_window,
+ &width, &height);
gtk_paint_flat_box(gtk_widget_get_style (widget), priv->bin_window,
GTK_STATE_NORMAL, GTK_SHADOW_NONE,
&event->area, widget, "viewportbin",
- 0, 0, -1, -1);
+ 0, 0, width, height);
GTK_WIDGET_CLASS (gtk_viewport_parent_class)->expose_event (widget, event);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]