[metacity] surface: always add frame region to shape region



commit 929d27a8506eb5e37c3ee803dc0b93ccfcc0c42d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Fri Oct 18 02:48:14 2019 +0300

    surface: always add frame region to shape region

 src/compositor/meta-surface.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-surface.c b/src/compositor/meta-surface.c
index 6c163542..ca976e36 100644
--- a/src/compositor/meta-surface.c
+++ b/src/compositor/meta-surface.c
@@ -132,8 +132,6 @@ update_shape_region (MetaSurface   *self,
 
   if (priv->window->frame != NULL && priv->window->shape_region != None)
     {
-      XserverRegion frame_region;
-
       shape_region = XFixesCreateRegion (priv->xdisplay, NULL, 0);
       XFixesCopyRegion (priv->xdisplay, shape_region, priv->window->shape_region);
 
@@ -141,10 +139,6 @@ update_shape_region (MetaSurface   *self,
                              shape_region,
                              client_rect.x,
                              client_rect.y);
-
-      frame_region = get_frame_region (self, &client_rect);
-      XFixesUnionRegion (priv->xdisplay, shape_region, shape_region, frame_region);
-      XFixesDestroyRegion (priv->xdisplay, frame_region);
     }
   else if (priv->window->shape_region != None)
     {
@@ -158,6 +152,15 @@ update_shape_region (MetaSurface   *self,
 
   g_assert (shape_region != None);
 
+  if (priv->window->frame != NULL)
+    {
+      XserverRegion frame_region;
+
+      frame_region = get_frame_region (self, &client_rect);
+      XFixesUnionRegion (priv->xdisplay, shape_region, shape_region, frame_region);
+      XFixesDestroyRegion (priv->xdisplay, frame_region);
+    }
+
   XFixesUnionRegion (priv->xdisplay, damage_region, damage_region, shape_region);
 
   priv->shape_region = shape_region;


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