X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=gtk%2Fsrc%2Fghbcompositor.c;h=d1517340c3ff4454fb1f4a669b35c591b9f46007;hb=0884cb45aeeb60a46effe1d1056a61fe68300ea7;hp=df437ee0be7bbccb92db9c5e3fca5c677ca10937;hpb=721f6834d51f85ebb5763ad8d34d2e18bb7db498;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/gtk/src/ghbcompositor.c b/gtk/src/ghbcompositor.c index df437ee0..d1517340 100644 --- a/gtk/src/ghbcompositor.c +++ b/gtk/src/ghbcompositor.c @@ -364,17 +364,17 @@ ghb_compositor_zlist_insert ( gtk_widget_set_parent(child, GTK_WIDGET(compositor)); display = gtk_widget_get_display (GTK_WIDGET(compositor)); - if (gdk_display_supports_composite(display)) - { - cc = g_new(GhbCompositorChild, 1); - cc->widget = child; - cc->z_pos = z_pos; - cc->opacity = opacity; - cc->drawables = NULL; - compositor->children = g_list_insert_sorted( + cc = g_new(GhbCompositorChild, 1); + cc->widget = child; + cc->z_pos = z_pos; + cc->opacity = opacity; + cc->drawables = NULL; + compositor->children = g_list_insert_sorted( compositor->children, cc, zsort); + if (gdk_display_supports_composite(display)) + { GList *link; cc->drawables = find_drawables(NULL, cc->widget); @@ -570,6 +570,7 @@ ghb_compositor_size_allocate (GtkWidget *widget, GtkAllocation *allocation) child_allocation.x = 0; child_allocation.y = 0; } + child_allocation.width = MAX (allocation->width - GTK_CONTAINER (widget)->border_width * 2, 0); child_allocation.height = MAX (allocation->height - @@ -589,7 +590,8 @@ ghb_compositor_size_allocate (GtkWidget *widget, GtkAllocation *allocation) for (link = compositor->children; link != NULL; link = link->next) { cc = (GhbCompositorChild*)link->data; - gtk_widget_size_allocate (cc->widget, &child_allocation); + if (GTK_WIDGET_REALIZED (cc->widget)) + gtk_widget_size_allocate (cc->widget, &child_allocation); } } @@ -615,6 +617,10 @@ ghb_compositor_blend (GtkWidget *widget, GdkEventExpose *event) { /* get our child */ child = GTK_WIDGET(draw->data); + if (!GTK_WIDGET_VISIBLE(cc->widget) || + !GTK_WIDGET_VISIBLE(child)) + continue; + /* the source data is the (composited) event box */ gdk_cairo_set_source_pixmap (cr, child->window, child->allocation.x,