[Spice-devel] [RFC spice-gtk 1/2] spice-widget: make draw-area visible on update_image

Kevin Pouget kpouget at redhat.com
Tue Aug 6 15:34:52 UTC 2019


When switching from a Gstreamer video stream (on the gst-area) to an
mjpeg stream, the "draw-area" was not set as visible. During the
mjpeg->gst switch, the problem does not happen, as the gstreamer
overlay is already re-created and made visible.

This patch makes the draw-area always visible on update_image. As
Gstreamer overlay is created afterwards (if it's a gstreamer stream),
we are sure that the right area will be visible.

This may not be the best place for this line...

Signed-off-by: Kevin Pouget <kpouget at redhat.com>
---
 src/spice-widget.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index a9ba1f1..7399a69 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -2210,6 +2210,8 @@ static void update_image(SpiceDisplay *display)
     SpiceDisplayPrivate *d = display->priv;
 
     spice_cairo_image_create(display);
+    gtk_stack_set_visible_child_name(d->stack, "draw-area");
+
     if (d->canvas.convert)
         do_color_convert(display, &d->area);
 }
-- 
2.21.0



More information about the Spice-devel mailing list