summaryrefslogtreecommitdiff
path: root/gtk/channel-cursor.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-12-18 17:48:34 +0100
committerMarc-André Lureau <marcandre.lureau@redhat.com>2011-12-19 13:07:46 +0100
commitf7c5f1e8fd7af0abc5512e504ba9f06e0e9411e8 (patch)
treea9502fe128c91fa045781f16ac472c423b4c8247 /gtk/channel-cursor.c
parentb64b432e72a8b72c8f551bb3e98b4ad422dcb83d (diff)
Add channel_reset method
This new private method is to reset the channel to its initial state, used by semi-seamless migration
Diffstat (limited to 'gtk/channel-cursor.c')
-rw-r--r--gtk/channel-cursor.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/channel-cursor.c b/gtk/channel-cursor.c
index 4ad402c..6766b40 100644
--- a/gtk/channel-cursor.c
+++ b/gtk/channel-cursor.c
@@ -92,6 +92,17 @@ static void spice_cursor_channel_finalize(GObject *obj)
G_OBJECT_CLASS(spice_cursor_channel_parent_class)->finalize(obj);
}
+/* coroutine context */
+static void spice_cursor_channel_reset(SpiceChannel *channel, gboolean migrating)
+{
+ SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv;
+
+ delete_cursor_all(channel);
+ c->init_done = FALSE;
+
+ SPICE_CHANNEL_CLASS(spice_cursor_channel_parent_class)->channel_reset(channel, migrating);
+}
+
static void spice_cursor_channel_class_init(SpiceCursorChannelClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
@@ -99,6 +110,7 @@ static void spice_cursor_channel_class_init(SpiceCursorChannelClass *klass)
gobject_class->finalize = spice_cursor_channel_finalize;
channel_class->handle_msg = spice_cursor_handle_msg;
+ channel_class->channel_reset = spice_cursor_channel_reset;
/**
* SpiceCursorChannel::cursor-set: