From: Jonathon Jongsma <jjongsma@xxxxxxxxxx> --- server/inputs-channel.c | 8 ++++---- server/reds.c | 2 +- server/reds.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/inputs-channel.c b/server/inputs-channel.c index 5ab76cb..bb5b203 100644 --- a/server/inputs-channel.c +++ b/server/inputs-channel.c @@ -364,7 +364,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui red_channel_client_pipe_add_type(rcc, PIPE_ITEM_MOUSE_MOTION_ACK); icc->motion_count = 0; } - if (mouse && reds_get_mouse_mode() == SPICE_MOUSE_MODE_SERVER) { + if (mouse && reds_get_mouse_mode(reds) == SPICE_MOUSE_MODE_SERVER) { SpiceMouseInterface *sif; sif = SPICE_CONTAINEROF(mouse->base.sif, SpiceMouseInterface, base); sif->motion(mouse, @@ -381,7 +381,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui red_channel_client_pipe_add_type(rcc, PIPE_ITEM_MOUSE_MOTION_ACK); icc->motion_count = 0; } - if (reds_get_mouse_mode() != SPICE_MOUSE_MODE_CLIENT) { + if (reds_get_mouse_mode(reds) != SPICE_MOUSE_MODE_CLIENT) { break; } spice_assert((reds_get_agent_mouse() && reds_has_vdagent()) || tablet); @@ -407,7 +407,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui } else if (mouse_press->button == SPICE_MOUSE_BUTTON_DOWN) { dz = 1; } - if (reds_get_mouse_mode() == SPICE_MOUSE_MODE_CLIENT) { + if (reds_get_mouse_mode(reds) == SPICE_MOUSE_MODE_CLIENT) { if (reds_get_agent_mouse() && reds_has_vdagent()) { inputs_channel->mouse_state.buttons = RED_MOUSE_BUTTON_STATE_TO_AGENT(mouse_press->buttons_state) | @@ -429,7 +429,7 @@ static int inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui } case SPICE_MSGC_INPUTS_MOUSE_RELEASE: { SpiceMsgcMouseRelease *mouse_release = message; - if (reds_get_mouse_mode() == SPICE_MOUSE_MODE_CLIENT) { + if (reds_get_mouse_mode(reds) == SPICE_MOUSE_MODE_CLIENT) { if (reds_get_agent_mouse() && reds_has_vdagent()) { inputs_channel->mouse_state.buttons = RED_MOUSE_BUTTON_STATE_TO_AGENT(mouse_release->buttons_state); diff --git a/server/reds.c b/server/reds.c index 601fe27..85ec97b 100644 --- a/server/reds.c +++ b/server/reds.c @@ -594,7 +594,7 @@ static void reds_mig_disconnect(void) } } -int reds_get_mouse_mode(void) +int reds_get_mouse_mode(RedsState *reds) { return reds->mouse_mode; } diff --git a/server/reds.h b/server/reds.h index d27b592..f5405ac 100644 --- a/server/reds.h +++ b/server/reds.h @@ -57,7 +57,7 @@ void reds_set_client_mouse_allowed(int is_client_mouse_allowed, int x_res, int y_res); void reds_register_channel(RedsState *reds, RedChannel *channel); void reds_unregister_channel(RedsState *reds, RedChannel *channel); -int reds_get_mouse_mode(void); // used by inputs_channel +int reds_get_mouse_mode(RedsState *reds); // used by inputs_channel int reds_get_agent_mouse(void); // used by inputs_channel int reds_has_vdagent(void); // used by inputs channel void reds_handle_agent_mouse_event(const VDAgentMouseState *mouse_state); // used by inputs_channel -- 2.4.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel