XClearArea painting None-background windows?

sukru cinar cinarus at yahoo.com
Fri Oct 20 02:52:00 PDT 2006


Hello all,

I'm making a simple X11 application and got stuck. I
create a window using

v->window= XCreateSimpleWindow(xdpy, parent,x,y
      ,w,h, 3, 0, None);

When the widget needs to be updated, I invalidate
the whole window by

XClearArea(xdpy, v->window, 
  0,0, v->width, v->height,
  True);

Then, I XShmPutImage the computed image on the window,
inside the Expose event handler. 

>From what I read in the XClearArea manual page I
understand that the image should overwrite the
previous contents of the window, w/o any clearing of
the window in between. However, I can see a black
flicker when this code runs.  

I don't understand why this happens. Is the generation
of an Expose clearing the window? What am I missing in
this code? 

I'm quite inexperienced with X11 programming. Any
pointers would be highly appreciated.

Thanks in advance.

-sukru

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the xorg mailing list