summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2009-07-07 16:51:11 +0200
committerAlexander Larsson <alexl@redhat.com>2009-07-07 17:10:49 +0200
commit62db28607bae28c660bba1f559dbd5f44a6f89c7 (patch)
tree3a97f15e68a08c83dea57b1e2da877886e5c2a37
parent52e3d2cf0e848d8956a6091c68b6d382cbbf4eb6 (diff)
downloadgdk-pixbuf-62db28607bae28c660bba1f559dbd5f44a6f89c7.tar.gz
The shape is in window coordinate, so properly offset it when using it
-rw-r--r--gdk/gdkwindow.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6e72cab16..d9b1e5b57 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -639,7 +639,12 @@ remove_child_area (GdkWindowObject *private,
child_region = gdk_region_rectangle (&r);
if (child->shape)
- gdk_region_intersect (child_region, child->shape);
+ {
+ /* Adjust shape region to parent window coords */
+ gdk_region_offset (child->shape, child->x, child->y);
+ gdk_region_intersect (child_region, child->shape);
+ gdk_region_offset (child->shape, -child->x, -child->y);
+ }
else if (private->window_type == GDK_WINDOW_FOREIGN)
{
shape = _gdk_windowing_window_get_shape ((GdkWindow *)child);
@@ -4660,7 +4665,12 @@ _gdk_window_process_updates_recurse (GdkWindow *window,
child_region = gdk_region_rectangle (&r);
if (child->shape)
- gdk_region_intersect (child_region, child->shape);
+ {
+ /* Adjust shape region to parent window coords */
+ gdk_region_offset (child->shape, child->x, child->y);
+ gdk_region_intersect (child_region, child->shape);
+ gdk_region_offset (child->shape, -child->x, -child->y);
+ }
if (child->impl == private->impl)
{