summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2018-02-15 09:18:26 +0100
committerOlivier Fourdan <ofourdan@redhat.com>2018-02-22 08:02:01 +0000
commit19bf4cf4f830d8bc3beaa8f9f61bc9adc13a1bbc (patch)
treea91bef00413264af66f2b93ba8fb63f34164ea28
parent6f59e4858e24c828e3ab0e611d36dfaaded1b272 (diff)
downloadmutter-19bf4cf4f830d8bc3beaa8f9f61bc9adc13a1bbc.tar.gz
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
-rw-r--r--src/x11/window-x11.c6
1 files 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);
}