Knowing if an XserverRegion is empty

iain iain at openedhand.com
Fri Nov 30 04:00:32 PST 2007


On Fri, 2007-11-30 at 12:57 +1100, Russell Shaw wrote:
> iain wrote:
> > Sorry if this is a stupid question, but is it possible to know when an
> > XserverRegion is empty? My use case is I iterate over a list or
> > XserverRegions subtracting them from a larger region. I'd like to be
> > able to stop iterating the list once the larger region has had
> > everything subtracted from it. Is this possible?
> 
> http://tronche.com/gui/x/xlib/utilities/regions/XEmptyRegion.html

Yes, but that only works on Region, not XserverRegion and I don't see
any way of converting between the two. 

I've managed to do this by calling XFixesFetchRegion and then checking
how many rectangles are returned, but is there any great speed penalty
for calling this function a lot?

iain




More information about the xorg mailing list