On Thu, 2017-06-08 at 00:55 +0400, marcandre.lur...@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lur...@redhat.com>
> 
> And call spice_egl_resize_display() when initializing the context.
> 
> This fixes the "Couldn't find current GL or GLX context" error for
> me
> on X11. I thought first it was somehow related to commit
> a395ac59447de
> "spice-widget: init egl only after first gl_scanout", but reverting
> it
> didn't solve the problem, there are other timing changes, probably
> at
> gtk level.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com>
> ---
>  src/spice-widget.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index d948c6d..319d867 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -1329,7 +1329,7 @@ static void set_egl_enabled(SpiceDisplay
> *display, bool enabled)
>                                           enabled ? "gl-area" :
> "draw-area");
>      }
>  
> -    if (enabled) {
> +    if (enabled && d->egl.context_ready) {
>          spice_egl_resize_display(display, d->ww, d->wh);
>      }
>  
> @@ -2863,6 +2863,8 @@ void
> spice_display_widget_gl_scanout(SpiceDisplay *display)
>              g_critical("egl realize failed: %s", err->message);
>              g_clear_error(&err);
>          }
> +
> +        spice_egl_resize_display(display, d->ww, d->wh);
>      }

I am bit lost with this commit. next call is set_egl_enabled(display,
true); which calls spice_egl_resize_display() (conditionally).

sorry, I need more explanation...

Pavel

>  #endif
>  
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to