[gtk+] The shape is in window coordinate, so properly offset it when using it
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+] The shape is in window coordinate, so properly offset it when using it
- Date: Tue, 7 Jul 2009 15:12:17 +0000 (UTC)
commit 62db28607bae28c660bba1f559dbd5f44a6f89c7
Author: Alexander Larsson <alexl redhat com>
Date: Tue Jul 7 16:51:11 2009 +0200
The shape is in window coordinate, so properly offset it when using it
gdk/gdkwindow.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 6e72cab..d9b1e5b 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]