summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-11-04 15:08:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-11-04 15:08:02 +0000
commit0f57262e739af7584f072a100f58fa8b67eff9f4 (patch)
treefd0baa5330fbf9cc40b273068ef027c3330db273 /src/main.c
parent8fe2a9c3c458ef7205254f25e06ca5aa28bcb0f2 (diff)
Fix offset of image display.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 000b1b9..4bfed54 100644
--- a/src/main.c
+++ b/src/main.c
@@ -532,9 +532,8 @@ surface_view_expose (GtkWidget *w, GdkEventExpose *ev)
cr = gdk_cairo_create (w->window);
gdk_cairo_region (cr, ev->region);
cairo_clip (cr);
- cairo_set_source_surface (cr, self->surface,
- (w->allocation.width - cairo_image_surface_get_width (self->surface))/2,
- (w->allocation.height - cairo_image_surface_get_height (self->surface))/2);
+ cairo_translate (cr, w->allocation.x, w->allocation.y);
+ cairo_set_source_surface (cr, self->surface, 0, 0);
cairo_paint (cr);
cairo_destroy (cr);