inputs-channel: Remove reds argument from inputs_channel_set_tablet

All other inputs_channel_set_* functions do not have this
parameter and get it from the channel.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <uril@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-11-23 14:28:38 +00:00
parent d61fce91ee
commit 9575713dfb
3 changed files with 4 additions and 4 deletions

View File

@ -633,7 +633,7 @@ static SpiceTabletInstance* inputs_channel_get_tablet(InputsChannel *inputs)
return inputs->tablet;
}
int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet, RedsState *reds)
int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet)
{
if (inputs->tablet) {
spice_printerr("already have tablet");
@ -641,7 +641,7 @@ int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet
}
inputs->tablet = tablet;
inputs->tablet->st = spice_tablet_state_new();
inputs->tablet->st->reds = reds;
inputs->tablet->st->reds = red_channel_get_server(RED_CHANNEL(inputs));
return 0;
}

View File

@ -52,7 +52,7 @@ void inputs_channel_set_tablet_logical_size(InputsChannel *inputs, int x_res, in
int inputs_channel_set_keyboard(InputsChannel *inputs, SpiceKbdInstance *keyboard);
int inputs_channel_set_mouse(InputsChannel *inputs, SpiceMouseInstance *mouse);
int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet, RedsState *reds);
int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet);
int inputs_channel_has_tablet(InputsChannel *inputs);
void inputs_channel_detach_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet);
RedsState* spice_tablet_state_get_server(SpiceTabletState *dev);

View File

@ -3331,7 +3331,7 @@ SPICE_GNUC_VISIBLE int spice_server_add_interface(SpiceServer *reds,
spice_warning("unsupported tablet interface");
return -1;
}
if (inputs_channel_set_tablet(reds->inputs_channel, tablet, reds) != 0) {
if (inputs_channel_set_tablet(reds->inputs_channel, tablet) != 0) {
return -1;
}
reds_update_mouse_mode(reds);