Commit 44012804 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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.
parent 3392bdad
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):
......
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):
......
......@@ -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))
......
......@@ -287,6 +287,7 @@ struct _GdkWindowObject
guint accept_focus : 1;
guint focus_on_map : 1;
guint shaped : 1;
GdkEventMask event_mask;
};
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment