[metacity] window: clip shape region to window size



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

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

 src/core/window.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/src/core/window.c b/src/core/window.c
index f45374f7..225bffd2 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -9220,6 +9220,19 @@ meta_window_update_shape_region (MetaWindow *window)
       return;
     }
 
+  if (shape_region != None)
+    {
+      XserverRegion tmp;
+
+      tmp = XFixesCreateRegion (xdisplay, &(XRectangle) {
+                                  .width = window->rect.width,
+                                  .height = window->rect.height
+                                }, 1);
+
+      XFixesIntersectRegion (xdisplay, shape_region, shape_region, tmp);
+      XFixesDestroyRegion (xdisplay, tmp);
+    }
+
   if (window->shape_region != None)
     XFixesDestroyRegion (xdisplay, window->shape_region);
   window->shape_region = shape_region;


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