X window program under Linux problem

From: Tom Li (Tom374233@yahoo.com.cn)
Date: 04/01/03


From: Tom374233@yahoo.com.cn (Tom Li)
Date: 1 Apr 2003 01:14:03 -0800

Hi all,

I have write a X window program under Linux: by a shared memory, put
the image to a window. I use the following functions to show the
image:
    XPutImage(dpy,win,gc,img,0,0,0,0,W,y);
    XSync(dpy,0);

To simplify my problem, my program like this:
First,
    create window, image, ... etc.

Then,
    XPutImage(dpy,win,gc,img,0,0,0,0,W,0);
    XSync(dpy,0);
is OK.

But
    XPutImage(dpy,win,gc,img,0,0,0,0,W,y); // y>0, such as 10, 20, ...
    XSync(dpy,0);
give the error like this:
   Serial number error.
   last serial number: 16
   Current serial number: 18

Who know why?

Thanks a lot!

Tom Li



Relevant Pages