Optimize gdk_window_set_shape_combine_region

When setting no shape on an unshaped window, nothing changes,
so return early instead of recomputing lots of visibility
information.

Pointed out by Owen Taylor in bug 637156.
This commit is contained in:
Matthias Clasen 2010-12-14 22:21:39 -05:00
parent b7fd6f1e88
commit 208d717fef

View File

@ -7167,6 +7167,9 @@ gdk_window_shape_combine_region (GdkWindow *window,
if (GDK_WINDOW_DESTROYED (window))
return;
if (!window->shape && shape_region == NULL)
return;
window->shaped = (shape_region != NULL);
if (window->shape)