The motion count must stay synchronized with the server, otherwise, it is possible that we will stop sending motion events to the server after migration. rhbz#835997 --- gtk/channel-inputs.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/gtk/channel-inputs.c b/gtk/channel-inputs.c index ef35065..02ac026 100644 --- a/gtk/channel-inputs.c +++ b/gtk/channel-inputs.c @@ -69,6 +69,7 @@ static guint signals[SPICE_INPUTS_LAST_SIGNAL]; static void spice_inputs_handle_msg(SpiceChannel *channel, SpiceMsgIn *msg); static void spice_inputs_channel_up(SpiceChannel *channel); +static void spice_inputs_channel_reset(SpiceChannel *channel, gboolean migrating); /* ------------------------------------------------------------------ */ @@ -109,6 +110,7 @@ static void spice_inputs_channel_class_init(SpiceInputsChannelClass *klass) gobject_class->get_property = spice_inputs_get_property; channel_class->handle_msg = spice_inputs_handle_msg; channel_class->channel_up = spice_inputs_channel_up; + channel_class->channel_reset = spice_inputs_channel_reset; g_object_class_install_property (gobject_class, PROP_KEY_MODIFIERS, @@ -583,3 +585,11 @@ static void spice_inputs_channel_up(SpiceChannel *channel) msg = set_key_locks(SPICE_INPUTS_CHANNEL(channel), c->locks); spice_msg_out_send_internal(msg); } + +static void spice_inputs_channel_reset(SpiceChannel *channel, gboolean migrating) +{ + SpiceInputsChannelPrivate *c = SPICE_INPUTS_CHANNEL(channel)->priv; + c->motion_count = 0; + + SPICE_CHANNEL_CLASS(spice_inputs_channel_parent_class)->channel_reset(channel, migrating); +} -- 1.7.7.6 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel