[metacity/gnome-3-34] compositor-xrender: clip shape region to window size



commit 83d31a014fd74df4d92a8e20e4994c005a0d8fe4
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Oct 13 21:08:16 2019 +0300

    compositor-xrender: clip shape region to window size
    
    https://bugzilla.gnome.org/show_bug.cgi?id=627879

 src/compositor/meta-compositor-xrender.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
---
diff --git a/src/compositor/meta-compositor-xrender.c b/src/compositor/meta-compositor-xrender.c
index 4b8d99be..42b805b6 100644
--- a/src/compositor/meta-compositor-xrender.c
+++ b/src/compositor/meta-compositor-xrender.c
@@ -1141,6 +1141,21 @@ get_window_region (MetaDisplay    *display,
 
   XFixesTranslateRegion (xdisplay, region, cw->rect.x, cw->rect.y);
 
+  if (cw->window->shape_region != NULL)
+    {
+      XserverRegion tmp;
+
+      tmp = XFixesCreateRegion (xdisplay, &(XRectangle) {
+                                  .x = cw->rect.x,
+                                  .y = cw->rect.y,
+                                  .width = cw->rect.width,
+                                  .height = cw->rect.height,
+                                }, 1);
+
+      XFixesIntersectRegion (xdisplay, region, region, tmp);
+      XFixesDestroyRegion (xdisplay, tmp);
+    }
+
   return region;
 }
 


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