[Spice-commits] 3 commits - gtk/channel-main.c gtk/spice-session.c gtk/spice-widget.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Mon Apr 16 11:12:42 PDT 2012


 gtk/channel-main.c  |    9 ++++++---
 gtk/spice-session.c |    8 ++++++--
 gtk/spice-widget.c  |    3 ++-
 3 files changed, 14 insertions(+), 6 deletions(-)

New commits:
commit ff7994ca59f9afffb028b7380b3deb587d84db0e
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Sun Apr 15 21:57:01 2012 +0200

    Clear cache and glz dictionnary on switch-host
    
    If we don't clear the glz dictionnary, this might lead to
    corrupted/invalid dictionnary and invalid memory allocation due
    unbounded increase of dictionnary size

diff --git a/gtk/spice-session.c b/gtk/spice-session.c
index d30d089..02b35f3 100644
--- a/gtk/spice-session.c
+++ b/gtk/spice-session.c
@@ -1122,9 +1122,9 @@ gboolean spice_session_get_client_provided_socket(SpiceSession *session)
 }
 
 G_GNUC_INTERNAL
-void spice_session_switching_disconnect(SpiceSession *session)
+void spice_session_switching_disconnect(SpiceSession *self)
 {
-    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(session);
+    SpiceSessionPrivate *s = SPICE_SESSION_GET_PRIVATE(self);
     struct channel *item;
     RingItem *ring, *next;
 
@@ -1141,6 +1141,10 @@ void spice_session_switching_disconnect(SpiceSession *session)
     }
 
     g_warn_if_fail(!ring_is_empty(&s->channels)); /* ring_get_length() == 1 */
+
+    spice_session_palettes_clear(self);
+    spice_session_images_clear(self);
+    glz_decoder_window_clear(s->glz_window);
 }
 
 G_GNUC_INTERNAL
commit 1ee71103c5b4251e10b6e44d2fb3eafa332cfe89
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Sun Apr 15 21:31:51 2012 +0200

    Set new cert-subject when switching host
    
    https://bugzilla.redhat.com/show_bug.cgi?id=802574

diff --git a/gtk/channel-main.c b/gtk/channel-main.c
index 8d0a809..9de51d7 100644
--- a/gtk/channel-main.c
+++ b/gtk/channel-main.c
@@ -1706,8 +1706,8 @@ static void main_handle_migrate_switch_host(SpiceChannel *channel, SpiceMsgIn *i
         g_return_if_fail(subject[mig->cert_subject_size - 1] == '\0');
     }
 
-    SPICE_DEBUG("migrate_switch %s %d %d",
-                host, mig->port, mig->sport);
+    SPICE_DEBUG("migrate_switch %s %d %d %s",
+                host, mig->port, mig->sport, subject);
 
     if (c->switch_host_delayed_id != 0) {
         g_warning("Switching host already in progress, aborting it");
@@ -1717,7 +1717,10 @@ static void main_handle_migrate_switch_host(SpiceChannel *channel, SpiceMsgIn *i
 
     session = spice_channel_get_session(channel);
     spice_session_set_migration_state(session, SPICE_SESSION_MIGRATION_SWITCHING);
-    g_object_set(session, "host", host, NULL);
+    g_object_set(session,
+                 "host", host,
+                 "cert-subject", subject,
+                 NULL);
     spice_session_set_port(session, mig->port, FALSE);
     spice_session_set_port(session, mig->sport, TRUE);
 
commit 6883155ab41bed83aed3735480dc32c490df9024
Author: Marc-André Lureau <marcandre.lureau at redhat.com>
Date:   Fri Apr 13 18:52:57 2012 +0200

    gtk: scroll event are not received with recent gtk+
    
    Add explicit scroll event mask to make it work again.

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 30e58dc..d355f09 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -379,7 +379,8 @@ static void spice_display_init(SpiceDisplay *display)
                           GDK_BUTTON_MOTION_MASK |
                           GDK_ENTER_NOTIFY_MASK |
                           GDK_LEAVE_NOTIFY_MASK |
-                          GDK_KEY_PRESS_MASK);
+                          GDK_KEY_PRESS_MASK |
+                          GDK_SCROLL_MASK);
     gtk_widget_set_double_buffered(widget, false);
     gtk_widget_set_can_focus(widget, true);
     gtk_widget_set_has_window(widget, true);


More information about the Spice-commits mailing list