summaryrefslogtreecommitdiff
path: root/gdk/gdkwindow.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-12-14 22:21:39 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-12-14 22:21:39 -0500
commit208d717fefb7d1d1faa0dada132a290036b458d0 (patch)
tree0bb4eb249a1e7cdc4b887367d0b687e2ba7a5978 /gdk/gdkwindow.c
parentb7fd6f1e8826589646e2b0e2d7a848fc2fab3ee3 (diff)
downloadgtk+-208d717fefb7d1d1faa0dada132a290036b458d0.tar.gz
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.
Diffstat (limited to 'gdk/gdkwindow.c')
-rw-r--r--gdk/gdkwindow.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index becfba57f5..54f5d2f5d1 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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)