> The GC cliplist would be the "clipping region or clip path" but > will not include any overlapping windows. Hardly anybody sets the > GC clip so you're probably OK to always return the size of the window > for this. What do you mean by 'GC cliplist'? (sorry, but I'm a X11 rookie :-)
> This is in response to WM_PAINT events? Basically X doesn't work > this way. The dirty rects are sent to the client when it gets the > Expose events. > > The exact area renderable isn't definitely known by the X-client. > You can figure out (with alot of querying and math) the portion > of the window visible, but with things like overlay planes that's > not equal to the area that is renderable, and with things like > backing store there are even larger discrepancies. > > If you are trying to make WM_PAINT events out of X Expose > events then you should probably throw away all Expose events > that have non-zero counts and only respond to zero-count > Expose events. And your GetClipBox function should probably > return the whole window size. Alternatively you might be > able to collect the bounds of all the Expose events, treat > the non-zero event as the WM_PAINT event and return the bounds > that you've collected up to the non-zero count event as the > response to GetClipBox. Here's what I've found in some X11 docs: 'The X protocol does not guarantee to preserve the contents of window regions when the windows are obscured or reconfigured. Some implementations may preserve the contents of windows. Other implementations are free to destroy the contents of windows when exposed. X expects client applications to assume the responsibility for restoring the contents of an exposed window region. (An exposed window region describes a formerly obscured window whose region becomes visible.) Therefore, the X server sends Expose events describing the window and the region of the window that has been exposed. A naive client application usually redraws the entire window. A more sophisticated client application redraws only the exposed region.' So I take it that Expose events is what I need, but it's up to me to redraw only the portion that needs to be redrawn. The question is: can I process them one by one? Why should I take all the Expose events and union all the rects together, as Greg said? I can hardly believe that someone might succed in exposing 2 rectangles of a a window at the same time (i.e. moving to windows that overlap another, so that the last will have 2 rect to redraw)... Thanks for helping me on this one, guys! Boy am I going to stress you with a lot of questions or what! :-) Dany. _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert