mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
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.
This commit is contained in:
parent
f1d8428650
commit
203e5335ab
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user