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

Submitted by Kevin Pouget on Aug. 6, 2019, 3:34 p.m.


Message ID 20190806153453.20616-9-kpouget@redhat.com
State Superseded
Headers show

Not browsing as part of any series.

Commit Message

Kevin Pouget Aug. 6, 2019, 3:34 p.m.
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@redhat.com>
 src/spice-widget.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

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;
+    gtk_stack_set_visible_child_name(d->stack, "draw-area");
     if (d->canvas.convert)
         do_color_convert(display, &d->area);