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



commit 053f5088dfd775aa5d21c01b01c7cda4348af08f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jan 4 08:31:22 2016 -0800

    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 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 78649b3..99bffd7 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 (&region, cairo_region_destroy);
     }
 
   meta_window_set_shape_region (window, region);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]