Fix clearing of window background for some transparent notification icons

This extends the usage of the native clear region call such that its
called also for windows that have parent relative background all the
way up to a native window. That way we get true background relative
background clearing even to a foreign parent, which means that some
transparent notification icons look right again.
This commit is contained in:
Alexander Larsson 2009-08-11 15:41:23 +02:00
parent 60fa0da96d
commit fa21459066

View File

@ -4126,6 +4126,24 @@ gdk_window_clear (GdkWindow *window)
width, height);
}
static gboolean
clears_on_native (GdkWindowObject *private)
{
GdkWindowObject *next;
next = private;
do
{
private = next;
if (gdk_window_has_impl (private))
return TRUE;
next = private->parent;
}
while (private->bg_pixmap == GDK_PARENT_RELATIVE_BG &&
next && next->window_type != GDK_WINDOW_ROOT);
return FALSE;
}
static void
gdk_window_clear_region_internal (GdkWindow *window,
GdkRegion *region,
@ -4141,7 +4159,7 @@ gdk_window_clear_region_internal (GdkWindow *window,
gdk_window_clear_backing_region_redirect (window, region);
if (GDK_WINDOW_IMPL_GET_IFACE (private->impl)->clear_region &&
gdk_window_has_impl (private))
clears_on_native (private))
{
GdkRegion *copy;
copy = gdk_region_copy (region);