mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-09-21 06:20:29 +00:00
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:
parent
b7fd6f1e88
commit
208d717fef
@ -7167,6 +7167,9 @@ gdk_window_shape_combine_region (GdkWindow *window,
|
|||||||
if (GDK_WINDOW_DESTROYED (window))
|
if (GDK_WINDOW_DESTROYED (window))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!window->shape && shape_region == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
window->shaped = (shape_region != NULL);
|
window->shaped = (shape_region != NULL);
|
||||||
|
|
||||||
if (window->shape)
|
if (window->shape)
|
||||||
|
Loading…
Reference in New Issue
Block a user