Exit remove_child_area when region is empty

When the region is empty we can return early, because there
is no more area to remove. This happens often for children
of scrolled windows (i.e. things that are clipped out.
This commit is contained in:
Alexander Larsson 2009-07-19 22:36:43 +02:00
parent a057c03889
commit aa47fca68f

View File

@ -623,6 +623,11 @@ remove_child_area (GdkWindowObject *private,
if (child == until)
break;
/* If region is empty already, no need to do
anything potentially costly */
if (gdk_region_empty (region))
break;
if (!GDK_WINDOW_IS_MAPPED (child) || child->input_only || child->composited)
continue;