summaryrefslogtreecommitdiff
path: root/gtk/spice-widget.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/spice-widget.c')
-rw-r--r--gtk/spice-widget.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 8078686..257194b 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -42,7 +42,7 @@ struct spice_display {
SpiceChannel *main;
SpiceChannel *display;
SpiceCursorChannel *cursor;
- SpiceChannel *inputs;
+ SpiceInputsChannel *inputs;
enum SpiceMouseMode mouse_mode;
int mouse_grab_active;
@@ -983,6 +983,13 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
return;
}
+ if (SPICE_IS_INPUTS_CHANNEL(channel)) {
+ fprintf(stderr, "%s: inputs channel\n", __FUNCTION__);
+ d->inputs = SPICE_INPUTS_CHANNEL(channel);
+ spice_channel_connect(channel);
+ return;
+ }
+
switch (type) {
case SPICE_CHANNEL_DISPLAY:
fprintf(stderr, "%s: display channel\n", __FUNCTION__);
@@ -997,11 +1004,6 @@ static void channel_new(SpiceSession *s, SpiceChannel *channel, gpointer data)
G_CALLBACK(invalidate), display);
spice_channel_connect(channel);
break;
- case SPICE_CHANNEL_INPUTS:
- fprintf(stderr, "%s: inputs channel\n", __FUNCTION__);
- d->inputs = channel;
- spice_channel_connect(channel);
- break;
case SPICE_CHANNEL_MAIN:
fprintf(stderr, "%s: main channel\n", __FUNCTION__);
d->main = channel;