[Spice-commits] 2 commits - src/spice-channel.c src/spice-widget-egl.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Mon May 23 10:59:36 UTC 2016


 src/spice-channel.c    |    2 +-
 src/spice-widget-egl.c |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit f853ab3e6ec8702c76eb5f356c87d0b25d605d59
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Fri May 20 16:35:23 2016 +0200

    egl: only swap buffers on x11
    
    Gtk does it for us already with GtkGlArea.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/src/spice-widget-egl.c b/src/spice-widget-egl.c
index 7611b0b..961dcfa 100644
--- a/src/spice-widget-egl.c
+++ b/src/spice-widget-egl.c
@@ -572,7 +572,10 @@ 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())) {
+        /* gtk+ does the swap with gtkglarea */
+        eglSwapBuffers(d->egl.display, d->egl.surface);
+    }
 
     glUseProgram(prog);
 }
commit 73564cc1007a7c14e6c79dec67e99458de359898
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Fri May 20 15:45:43 2016 +0200

    channel: check if channel has a session
    
    Since 8943d2329, the channel may be disconnected from the session
    before it's destroyed. In this case, session is NULL.
    
    Fixes some critical with virt-manager when closing a display:
    
    (virt-manager:20451): GSpice-CRITICAL **: spice_session_is_for_migration: assertion 'SPICE_IS_SESSION(session)' failed
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Pavel Grunt <pgrunt at redhat.com>

diff --git a/src/spice-channel.c b/src/spice-channel.c
index 35a2cae..c555f75 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -2307,7 +2307,7 @@ static gboolean spice_channel_delayed_unref(gpointer data)
     c->state = SPICE_CHANNEL_STATE_UNCONNECTED;
 
     session = spice_channel_get_session(channel);
-    if (spice_session_is_for_migration(session)) {
+    if (session && spice_session_is_for_migration(session)) {
         /* error during migration - abort migration */
         spice_session_abort_migration(session);
         return FALSE;


More information about the Spice-commits mailing list