mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 22:20:24 +00:00
The shape is in window coordinate, so properly offset it when using it
This commit is contained in:
parent
52e3d2cf0e
commit
62db28607b
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user