On Thu, Jul 28, 2016 at 3:40 PM, Marc-André Lureau <mlureau@xxxxxxxxxx> wrote:
-- Hi
To avoid unused variables, you should move it...
----- Original Message -----
> When using GtkDrawingArea and EGL was not used, it was still initialized.
> This produced warning messages on systems where EGL is not supported.
>
> Move spice_egl_init from drawing_area_realize to gl_scanout.
...
>
> @@ -2662,8 +2653,28 @@ G_GNUC_INTERNAL
> void spice_display_widget_gl_scanout(SpiceDisplay *display)
> {
> SpiceDisplayPrivate *d = display->priv;
> + GError *err = NULL;
>
> SPICE_DEBUG("%s: got scanout", __FUNCTION__);
> +
> +#ifdef GDK_WINDOWING_X11
> + GtkWidget *area = gtk_stack_get_child_by_name(d->stack, "draw-area");
> +
> + if (GDK_IS_X11_DISPLAY(gdk_display_get_default()) &&
> + !d->egl.context_ready &&
> + gtk_widget_get_realized(area)) {
here
> + if (!spice_egl_init(display, &err)) {
> + g_critical("egl init failed: %s", err->message);
> + g_clear_error(&err);
> + }
> +
> + if (!spice_egl_realize_display(display, gtk_widget_get_window(area),
> &err)) {
> + g_critical("egl realize failed: %s", err->message);
> + g_clear_error(&err);
> + }
> + }
> +#endif
> +
> set_egl_enabled(display, true);
>
> if (d->egl.context_ready) {
> --
other than that, looks good, ack
aah there's a second "GError *err = NULL;", in the "if (d->egl.context_ready)" block
that was supposed to be deleted. I guess I missed it
I'll send a fixup as v4.
Lukas Venhoda
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel