aboutsummaryrefslogtreecommitdiff
path: root/src/statistics/gtk_statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/statistics/gtk_statistics.c')
-rw-r--r--src/statistics/gtk_statistics.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/statistics/gtk_statistics.c b/src/statistics/gtk_statistics.c
index adac737f..bc7797f4 100644
--- a/src/statistics/gtk_statistics.c
+++ b/src/statistics/gtk_statistics.c
@@ -129,13 +129,21 @@ static gboolean
129statistics_expose (GtkWidget *statistics, 129statistics_expose (GtkWidget *statistics,
130 GdkEventExpose *event) 130 GdkEventExpose *event)
131{ 131{
132 GtkAllocation alloc;
132 cairo_t *cr; 133 cairo_t *cr;
133 134 gint x;
134 cr = gdk_cairo_create (statistics->window); 135 gint y;
135 cairo_translate (cr, event->area.x, event->area.y); 136
137 gtk_widget_translate_coordinates (statistics,
138 GTK_WIDGET (gtk_widget_get_toplevel (statistics)),
139 0, 0,
140 &x, &y);
141 gtk_widget_get_allocation (statistics, &alloc);
142 cr = gdk_cairo_create (statistics->window);
143 cairo_translate (cr, x, y);
136 cairo_rectangle (cr, 144 cairo_rectangle (cr,
137 0, 0, 145 0, 0,
138 event->area.width, event->area.height); 146 alloc.width, alloc.height);
139 cairo_clip (cr); 147 cairo_clip (cr);
140 148
141 gtk_statistics_draw (statistics, cr); 149 gtk_statistics_draw (statistics, cr);