diff options
author | Benjamin Otte <otte@redhat.com> | 2010-09-07 16:48:29 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-09-26 15:11:38 +0200 |
commit | 4a23b12911a7043b5b2f550935f05ff78acae797 (patch) | |
tree | 6458954556990c3edb2a957fb3d6d623dacc6cb8 /gtk/gtkviewport.c | |
parent | e087fe7e99ae6842e9b591c50252362c5a6b1d2b (diff) | |
download | gtk+-4a23b12911a7043b5b2f550935f05ff78acae797.tar.gz |
viewport: Pass sizes explicitly to paint functions
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r-- | gtk/gtkviewport.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 8e92c41e21..f1336899d2 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -777,22 +777,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); } |