[gtk+] viewport: Pass sizes explicitly to paint functions
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] viewport: Pass sizes explicitly to paint functions
- Date: Sun, 26 Sep 2010 13:37:02 +0000 (UTC)
commit 4a23b12911a7043b5b2f550935f05ff78acae797
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 8e92c41..f133689 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]