ProcDamageCreate emits a damage event - why?

Erkki Seppala erkki.seppala at
Wed Mar 23 04:24:22 PDT 2011


I'm investigating an issue where applications receive damage events when
they create a new damage object. The code in question is this:

static int
ProcDamageCreate (ClientPtr client)
     if (pDrawable->type == DRAWABLE_WINDOW)
	pRegion = &((WindowPtr) pDrawable)->borderClip;
	DamageDamageRegion(pDrawable, pRegion);

     return Success;

and the relevant commit message for this 7-year old change by Keith at:

is this:

   * damageext/damageext.c: (ProcDamageCreate):
     Add borderClip to damage on creation so that clients
     needn't guess.

So what kind of guessing are we talking about here? What is the downside
of removing this initial damage event? The downside with the current
code is that it can lead to some excess work when no damage has 
occurred. (I wonder if the behavior can changed, though, if some 
applications already depend on it.)

The documentation at

is somewhat sparse..

More information about the xorg-devel mailing list