From: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- server/inputs-channel.c | 5 +++-- server/inputs-channel.h | 2 +- server/reds.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/inputs-channel.c b/server/inputs-channel.c index 71716d5..bb1c5ea 100644 --- a/server/inputs-channel.c +++ b/server/inputs-channel.c @@ -305,6 +305,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui InputsChannel *inputs_channel = (InputsChannel *)rcc->channel; InputsChannelClient *icc = (InputsChannelClient *)rcc; uint32_t i; + RedsState *reds = inputs_channel->base.reds; switch (type) { case SPICE_MSGC_INPUTS_KEY_DOWN: { @@ -618,7 +619,7 @@ static int inputs_channel_handle_migrate_data(RedChannelClient *rcc, return TRUE; } -InputsChannel* inputs_channel_new(void) +InputsChannel* inputs_channel_new(RedsState *reds) { ChannelCbs channel_cbs = { NULL, }; ClientCbs client_cbs = { NULL, }; @@ -675,7 +676,7 @@ int inputs_channel_set_keyboard(InputsChannel *inputs, SpiceKbdInstance *keyboar return -1; } inputs->keyboard = keyboard; - inputs->keyboard->st = spice_kbd_state_new(reds); + inputs->keyboard->st = spice_kbd_state_new(inputs->base.reds); return 0; } diff --git a/server/inputs-channel.h b/server/inputs-channel.h index 4070a23..fce757f 100644 --- a/server/inputs-channel.h +++ b/server/inputs-channel.h @@ -26,7 +26,7 @@ typedef struct InputsChannel InputsChannel; -InputsChannel* inputs_channel_new(void); +InputsChannel* inputs_channel_new(RedsState *reds); const VDAgentMouseState *inputs_channel_get_mouse_state(InputsChannel *inputs); void inputs_channel_on_keyboard_leds_change(InputsChannel *inputs, uint8_t leds); void inputs_channel_set_tablet_logical_size(InputsChannel *inputs, int x_res, int y_res); diff --git a/server/reds.c b/server/reds.c index 8f26d83..c407b55 100644 --- a/server/reds.c +++ b/server/reds.c @@ -3385,7 +3385,7 @@ static int do_spice_init(RedsState *reds, SpiceCoreInterface *core_interface) #endif reds->main_channel = main_channel_new(); - reds->inputs_channel = inputs_channel_new(); + reds->inputs_channel = inputs_channel_new(reds); reds->mouse_mode = SPICE_MOUSE_MODE_SERVER; -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel