Assume that we have a version of GTK+ that does the following:

 A) When it receives a DamageEvent on subwindow SW
    A1) Subtracts any anti-exposes that have a serial *older* than the serial
        of the DamageEvent from the area of the DamageEvent
    A2) Adds the remaining area (properly translated) to the parent window's
        invalid region.

 B) When processing an invalid region A, does, in sequence:

    B1) Record an anti expose with area A and serial N (the serial of the next request)
    B2) Subtract the area A (properly translated)
        from the damage region D(SW) of each composited subwindow.
    B3) Redraw the area A in the parent, including sampling the contents of all
         subwindows that overlap A.

We want to show that every time drawing occurs to subwindows SW, it will eventually
be copied onto the parent window by GTK+.

 Two basic cases:
  I) We draw to a pixel p that is not in the D(SW)
  II) We draw to pixel p that is in D(SW)

We don't have to consider the case of "partially in", since we can break every
drawing operation into a series of single pixel operations.

I)
   because p is not in D(SW) a damage event is generated with the serial of the
     drawing.

    I.a.) point p is not cancelled from the damage event

      Then we'll proceed on to invalidate and draw the new value of p to the parent

    II.b) point p is cancelled by an anti-expose. Since the anti-expose cancels
      p, it was generated from a series

      GTK1. B1) Record anti-expose for A (includes p)
      GTK2. B2) subtract(A) from D(SW)
      GTK3. B3) Draw SW onto parent

     where step B1) occurred *after* our drawing, so again the new value of p
     will be draw to the parent.

II)
   because p is in D(SW) a damage event has already been generated that includes p.
   Two sub-possibilities depending on when that damage event is processed by
   GTK+ whether p) is cancelled from it in step A).

    II.a) point p is not cancelled from the damage event.

      GTK1. A1) Process damage event including p
      GTK2. A2) Add p to the invalid region of the parent
      GTK3. B1) Record anti-expose for A (includes p)
      GTK4. B2) subtract(A) from D(SW)
      GTK5. B3) Draw SW onto parent

      Our drawing must have occurred before GTK4, since p is stil part of the D(SW)
      region, so GTK5 will draw the new value of p to the parent window

    II.b) point p is cancelled from the damage event by a previous anti-expose.
      So we know that GTK+ did the sequence:

      GTK1. B1) Record anti-expose for A (includes p)
      GTK2. B2) subtract(A) from D(SW)
      GTK3. B3) Draw SW onto parent
      GTK4. A1) Process damage event including p, with serial before GTK1,
                cancel p from it

    While the subwindow client did the series:

       SW1. Record damage to pixel p
       SW2. Draw to p again (our drawing)

    Since p was cancelled by the anti-expose recorded at GTK1, SW1 occurs before
    GTK1. Then since p is still in D(SW), SW2 occurs before GTK2. Thus GTK3 will
    draw the new vaue of p to the parent window.
