[Spice-commits] gtk/channel-inputs.c
Yonit Halperin
yhalperi at kemper.freedesktop.org
Thu Jul 12 05:52:40 PDT 2012
gtk/channel-inputs.c | 10 ++++++++++
1 file changed, 10 insertions(+)
New commits:
commit 9414fccffe934da493cb8e70740abad482cd27b8
Author: Yonit Halperin <yhalperi at redhat.com>
Date: Mon Jul 2 09:02:17 2012 +0300
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
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);
+}
More information about the Spice-commits
mailing list