diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2012-07-02 09:02:17 +0300 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2012-07-12 14:54:25 +0300 |
commit | 9414fccffe934da493cb8e70740abad482cd27b8 (patch) | |
tree | 5ac3b0ba265e04ba4594c7724e9b75a5f166d63a | |
parent | ac5a5b2c6aecca68a36bd6679eb1519723c9f271 (diff) |
migration/channel-inputs: reset motion count after migration
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
-rw-r--r-- | 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); +} |