Commit 203e5335 authored by Jasper St. Pierre's avatar Jasper St. Pierre
Browse files

window-x11: Fizzle out changes to the three different regions

GTK+ likes to set these, well, _NET_WM_OPAQUE_REGION in particular, to
the same value. Save some expensive and processing when this happens. We
should probably make GTK+ smarter.
parent f1d84286
......@@ -1685,6 +1685,9 @@ static void
meta_window_set_opaque_region (MetaWindow *window,
cairo_region_t *region)
{
if (cairo_region_equal (window->opaque_region, region))
return;
g_clear_pointer (&window->opaque_region, cairo_region_destroy);
if (region != NULL)
......@@ -1770,6 +1773,9 @@ static void
meta_window_set_input_region (MetaWindow *window,
cairo_region_t *region)
{
if (cairo_region_equal (window->input_region, region))
return;
g_clear_pointer (&window->input_region, cairo_region_destroy);
if (region != NULL)
......@@ -1876,6 +1882,9 @@ static void
meta_window_set_shape_region (MetaWindow *window,
cairo_region_t *region)
{
if (cairo_region_equal (window->shape_region, region))
return;
g_clear_pointer (&window->shape_region, cairo_region_destroy);
if (region != NULL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment