58 lines
1.7 KiB
Diff
58 lines
1.7 KiB
Diff
From 6abca7696c0c8b28f6e6f5e9c99723fe1abbbd24 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
|
|
Date: Tue, 16 Oct 2012 13:08:11 +0200
|
|
Subject: [PATCH 14/21] widget: apply color conversion when creating image
|
|
|
|
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 391cd39..1763b17 100644
|
|
--- a/gtk/spice-widget.c
|
|
+++ b/gtk/spice-widget.c
|
|
@@ -1506,11 +1506,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)
|
|
@@ -1859,7 +1870,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.12.1
|
|
|