The color conversion only happened during "invalidate", but we also need to apply it when the image is created in the first place. This solves initial screen being black after connection to agent-less guest with 16b colour depth: https://bugzilla.redhat.com/show_bug.cgi?id=843134 --- gtk/spice-widget.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index 13d7111..4832afd 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -1512,11 +1512,22 @@ static gboolean configure_event(GtkWidget *widget, GdkEventConfigure *conf) return true; } +static void update_image(SpiceDisplay *display) +{ + SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); + + spicex_image_create(display); + if (d->convert) + do_color_convert(display, &d->area); +} + static void realize(GtkWidget *widget) { + SpiceDisplay *display = SPICE_DISPLAY(widget); + GTK_WIDGET_CLASS(spice_display_parent_class)->realize(widget); - spicex_image_create(SPICE_DISPLAY(widget)); + update_image(display); } static void unrealize(GtkWidget *widget) @@ -1865,7 +1876,8 @@ static void update_area(SpiceDisplay *display, spicex_image_destroy(display); d->area = area; if (gtk_widget_get_realized(GTK_WIDGET(display))) - spicex_image_create(display); + update_image(display); + update_size_request(display); set_monitor_ready(display, true); -- 1.7.11.7 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel