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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user