[Spice-devel] [PATCH spice-gtk 4/7] egl: only swap buffers on x11

Marc-André Lureau marcandre.lureau at gmail.com
Fri May 20 15:16:40 UTC 2016


Gtk does it for us already with GtkGlArea.

Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
---
 src/spice-widget-egl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index fff2831..210b834 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -575,7 +575,9 @@ void spice_egl_update_display(SpiceDisplay *display)
                              0, 0, 1, 1);
     }
 
-    eglSwapBuffers(d->egl.display, d->egl.surface);
+    if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
+        eglSwapBuffers(d->egl.display, d->egl.surface);
+    }
 
     glUseProgram(prog);
 }
-- 
2.7.4



More information about the Spice-devel mailing list