We find the first child that covers >80% of the container and return that. This is a nice speedup for the common case of a GtkWindow being covered by a large opaque background. It will fall apart for fancy themes that play with transparency or for small windows because the shadow region gets too large. But then we just scan the whole node tree. We could think about adapting the 80% number, because that wasn't chosen with any real scientific data behind it.
228 KiB
228 KiB