Fix #316871, reported by Dan Winship:

2005-09-26  Matthias Clasen  <mclasen@redhat.com>

	Fix #316871, reported by Dan Winship:

	* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.

	* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
	(gdk_window_shape_combine_region): Set it here.

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
	remove the child area for shaped windows.
This commit is contained in:
Matthias Clasen 2005-09-26 20:27:44 +00:00 committed by Matthias Clasen
parent 3392bdadba
commit 4401280405
5 changed files with 35 additions and 2 deletions

View File

@ -1,3 +1,15 @@
2005-09-26 Matthias Clasen <mclasen@redhat.com>
Fix #316871, reported by Dan Winship:
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
(gdk_window_shape_combine_region): Set it here.
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
remove the child area for shaped windows.
2005-09-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_finalize):

View File

@ -1,3 +1,15 @@
2005-09-26 Matthias Clasen <mclasen@redhat.com>
Fix #316871, reported by Dan Winship:
* gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag.
* gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask)
(gdk_window_shape_combine_region): Set it here.
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
remove the child area for shaped windows.
2005-09-23 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkcellrendererpixbuf.c (gtk_cell_renderer_pixbuf_finalize):

View File

@ -2450,7 +2450,7 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
child_region = gdk_region_rectangle (&child_rect);
/* remove child area from the invalid area of the parent */
if (GDK_WINDOW_IS_MAPPED (child))
if (GDK_WINDOW_IS_MAPPED (child) && !child->shaped)
gdk_region_subtract (visible_region, child_region);
if (child_func && (*child_func) ((GdkWindow *)child, user_data))

View File

@ -287,6 +287,7 @@ struct _GdkWindowObject
guint accept_focus : 1;
guint focus_on_map : 1;
guint shaped : 1;
GdkEventMask event_mask;
};

View File

@ -3672,6 +3672,7 @@ gdk_window_shape_combine_mask (GdkWindow *window,
GdkBitmap *mask,
gint x, gint y)
{
GdkWindowObject *private = (GdkWindowObject *)window;
Pixmap pixmap;
gint xoffset, yoffset;
@ -3694,12 +3695,16 @@ gdk_window_shape_combine_mask (GdkWindow *window,
if (mask)
{
pixmap = GDK_PIXMAP_XID (mask);
private->shaped = TRUE;
}
else
{
x = 0;
y = 0;
pixmap = None;
private->shaped = FALSE;
}
XShapeCombineMask (GDK_WINDOW_XDISPLAY (window),
@ -3741,7 +3746,8 @@ gdk_window_shape_combine_region (GdkWindow *window,
GdkRegion *shape_region,
gint offset_x,
gint offset_y)
{
{
GdkWindowObject *private = (GdkWindowObject *)window;
gint xoffset, yoffset;
g_return_if_fail (GDK_IS_WINDOW (window));
@ -3770,6 +3776,8 @@ gdk_window_shape_combine_region (GdkWindow *window,
gint n_rects = 0;
XRectangle *xrects = NULL;
private->shaped = TRUE;
_gdk_region_get_xrectangles (shape_region,
0, 0,
&xrects, &n_rects);