summaryrefslogtreecommitdiff
path: root/pango-view/viewer-x.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango-view/viewer-x.c')
-rw-r--r--pango-view/viewer-x.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pango-view/viewer-x.c b/pango-view/viewer-x.c
index 25492f33..89864c08 100644
--- a/pango-view/viewer-x.c
+++ b/pango-view/viewer-x.c
@@ -66,10 +66,18 @@ x_view_create_surface (gpointer instance,
{
XViewer *x = (XViewer *) instance;
Pixmap pixmap;
+ GC gc;
pixmap = XCreatePixmap (x->display, DefaultRootWindow (x->display), width, height,
DefaultDepth (x->display, x->screen));
+ gc = XCreateGC (x->display, pixmap, 0, NULL);
+
+ XSetForeground (x->display, gc, WhitePixel (x->display, x->screen));
+ XFillRectangle (x->display, pixmap, gc, 0, 0, width, height);
+
+ XFreeGC (x->display, gc);
+
return (gpointer) pixmap;
}