From 053f5088dfd775aa5d21c01b01c7cda4348af08f Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 4 Jan 2016 08:31:22 -0800 Subject: [PATCH] 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. --- src/x11/window-x11.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 78649b37a..99bffd7b9 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -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 (®ion, cairo_region_destroy); } meta_window_set_shape_region (window, region);