window-x11: Fix unredirection for windows that explicitly set bounding

Some applications, like Chromium, explicitly set their bounding region
to the client area when full-screen. Detect this case, and allow us to
fullscreen when this happens.
This commit is contained in:
Jasper St. Pierre 2016-01-04 08:31:22 -08:00
parent 75b992c7d0
commit 053f5088df

View File

@ -1847,6 +1847,12 @@ meta_window_x11_update_shape_region (MetaWindow *window)
* this is simply the client area.
*/
cairo_region_intersect_rectangle (region, &client_area);
/* Some applications might explicitly set their bounding region
* to the client area. Detect these cases, and throw out the
* bounding region in this case. */
if (cairo_region_contains_rectangle (region, &client_area) == CAIRO_REGION_OVERLAP_IN)
g_clear_pointer (&region, cairo_region_destroy);
}
meta_window_set_shape_region (window, region);