summaryrefslogtreecommitdiff
path: root/src/core/window.c
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-10-13 21:47:13 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2019-10-13 21:47:13 +0300
commit83a7cf91d36f423877ba76865ad1e9293fa95813 (patch)
treeea9162a59d928f927cefc3b8c7c5bbf7e172f99b /src/core/window.c
parent773b6212ca76863e9b367af971678e4392fa3b95 (diff)
downloadmetacity-83a7cf91d36f423877ba76865ad1e9293fa95813.tar.gz
window: clip shape region to window size
https://bugzilla.gnome.org/show_bug.cgi?id=627879
Diffstat (limited to 'src/core/window.c')
-rw-r--r--src/core/window.c13
1 files changed, 13 insertions, 0 deletions
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;