Add RedsState arg to inputs_channel_new()

Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Jonathon Jongsma 2015-02-02 13:58:36 -06:00 committed by Frediano Ziglio
parent dc4051fb9a
commit 36b0735192
3 changed files with 5 additions and 4 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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;