Don't invalidate areas that are covered by mapped input-output child

Mon Mar 28 15:13:42 2005  Søren Sandmann  <sandmann@redhat.com>

	* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
	invalidate areas that are covered by mapped input-output child
	windows. Bug 141380.
This commit is contained in:
Søren Sandmann 2005-03-28 20:28:43 +00:00 committed by Søren Sandmann Pedersen
parent 0e832d57fc
commit 8e5713f3e0
4 changed files with 58 additions and 28 deletions

View File

@ -1,3 +1,9 @@
Mon Mar 28 15:13:42 2005 Søren Sandmann <sandmann@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
invalidate areas that are covered by mapped input-output child
windows. Bug 141380.
2005-03-28 Jeroen Zwartepoorte <jeroen.zwartepoorte@gmail.com>
* gtk/gtkfilechooserdefault.c: (update_preview_widget_visibility): Make

View File

@ -1,3 +1,9 @@
Mon Mar 28 15:13:42 2005 Søren Sandmann <sandmann@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
invalidate areas that are covered by mapped input-output child
windows. Bug 141380.
2005-03-28 Jeroen Zwartepoorte <jeroen.zwartepoorte@gmail.com>
* gtk/gtkfilechooserdefault.c: (update_preview_widget_visibility): Make

View File

@ -1,3 +1,9 @@
Mon Mar 28 15:13:42 2005 Søren Sandmann <sandmann@redhat.com>
* gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't
invalidate areas that are covered by mapped input-output child
windows. Bug 141380.
2005-03-28 Jeroen Zwartepoorte <jeroen.zwartepoorte@gmail.com>
* gtk/gtkfilechooserdefault.c: (update_preview_widget_visibility): Make

View File

@ -2441,6 +2441,7 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
{
GdkWindowObject *private = (GdkWindowObject *)window;
GdkRegion *visible_region;
GList *tmp_list;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@ -2454,6 +2455,45 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
visible_region = gdk_drawable_get_visible_region (window);
gdk_region_intersect (visible_region, region);
tmp_list = private->children;
while (tmp_list)
{
GdkWindowObject *child = tmp_list->data;
if (!child->input_only)
{
GdkRegion *child_region;
GdkRectangle child_rect;
gdk_window_get_position ((GdkWindow *)child,
&child_rect.x, &child_rect.y);
gdk_drawable_get_size ((GdkDrawable *)child,
&child_rect.width, &child_rect.height);
child_region = gdk_region_rectangle (&child_rect);
/* remove child area from the invalid area of the parent */
if (GDK_WINDOW_IS_MAPPED (child))
gdk_region_subtract (visible_region, child_region);
if (child_func && (*child_func) ((GdkWindow *)child, user_data))
{
gdk_region_offset (region, - child_rect.x, - child_rect.y);
gdk_region_offset (child_region, - child_rect.x, - child_rect.y);
gdk_region_intersect (child_region, region);
gdk_window_invalidate_maybe_recurse ((GdkWindow *)child,
child_region, child_func, user_data);
gdk_region_offset (region, child_rect.x, child_rect.y);
}
gdk_region_destroy (child_region);
}
tmp_list = tmp_list->next;
}
if (!gdk_region_empty (visible_region))
{
if (debug_updates)
@ -2470,34 +2510,6 @@ gdk_window_invalidate_maybe_recurse (GdkWindow *window,
gdk_window_schedule_update (window);
}
if (child_func)
{
GList *tmp_list;
tmp_list = private->children;
while (tmp_list)
{
GdkWindowObject *child = tmp_list->data;
tmp_list = tmp_list->next;
if (!child->input_only && (*child_func) ((GdkWindow *)child, user_data))
{
GdkRegion *child_region;
gint x, y;
gdk_window_get_position ((GdkWindow *)child, &x, &y);
/* This copy could be saved with a little more complexity */
child_region = gdk_region_copy (visible_region);
gdk_region_offset (child_region, - x, - y);
gdk_window_invalidate_maybe_recurse ((GdkWindow *)child, child_region, child_func, user_data);
gdk_region_destroy (child_region);
}
}
}
}
gdk_region_destroy (visible_region);