[mutter] x11: Do not discard shape region for undecorated windows



commit 19bf4cf4f830d8bc3beaa8f9f61bc9adc13a1bbc
Author: Olivier Fourdan <ofourdan redhat com>
Date:   Thu Feb 15 09:18:26 2018 +0100

    x11: Do not discard shape region for undecorated windows
    
    mutter would discard the shape region set by the client if its matches
    the entire client area in meta_window_x11_update_shape_region().
    
    However, if the window is later resized (maximized or other), the
    compositor will fail to update the shape region properly for undecorated
    windows because the shape region was discarded, which causes black areas
    to appear in place of the updated areas.
    
    If the client window is undecorated, keep the shape region even if when
    it matches the client area.
    
    https://gitlab.gnome.org/GNOME/mutter/issues/27
    
    Closes: #27

 src/x11/window-x11.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 74dc16571..e819c1b67 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -1933,11 +1933,11 @@ 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)
+       * bounding region in this case for decorated windows. */
+      if (window->decorated &&
+          cairo_region_contains_rectangle (region, &client_area) == CAIRO_REGION_OVERLAP_IN)
         g_clear_pointer (&region, cairo_region_destroy);
     }
 


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