From 1afcc78013863eac29bbbf5940afc00a7aa05261 Mon Sep 17 00:00:00 2001 From: "Ren, Zhaohan" Date: Mon, 20 Dec 2010 10:30:23 +0800 Subject: Create a pixmap with the same size of the destination window, not the root window. --- test/putsurface/putsurface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/putsurface/putsurface.c b/test/putsurface/putsurface.c index 0de786c..fcea3ad 100644 --- a/test/putsurface/putsurface.c +++ b/test/putsurface/putsurface.c @@ -98,8 +98,8 @@ static Pixmap create_pixmap(int width, int height) XGetWindowAttributes (x11_display, root, &attr); - printf("Create a pixmap from ROOT window %dx%d\n\n", attr.width, attr.height); - pixmap = XCreatePixmap(x11_display, root, attr.width, attr.height, + printf("Create a pixmap from ROOT window %dx%d, pixmap size %dx%d\n\n", attr.width, attr.height, width, height); + pixmap = XCreatePixmap(x11_display, root, width, height, DefaultDepth(x11_display, DefaultScreen(x11_display))); return pixmap; -- cgit v1.2.1