Re: [PATCH 05/15] Change reds_handle_agent_mouse_event() to take RedsState arg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>

On Mon, 2016-01-18 at 16:37 +0000, Frediano Ziglio wrote:
> From: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> 
> ---
>  server/inputs-channel.c | 6 +++---
>  server/reds.c           | 5 +++--
>  server/reds.h           | 2 +-
>  3 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/server/inputs-channel.c b/server/inputs-channel.c
> index bb5b203..d13f9d7 100644
> --- a/server/inputs-channel.c
> +++ b/server/inputs-channel.c
> @@ -396,7 +396,7 @@ static int
> inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
>          mouse_state->y = pos->y;
>          mouse_state->buttons = RED_MOUSE_BUTTON_STATE_TO_AGENT(pos-
> >buttons_state);
>          mouse_state->display_id = pos->display_id;
> -        reds_handle_agent_mouse_event(mouse_state);
> +        reds_handle_agent_mouse_event(reds, mouse_state);
>          break;
>      }
>      case SPICE_MSGC_INPUTS_MOUSE_PRESS: {
> @@ -413,7 +413,7 @@ static int
> inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
>                      RED_MOUSE_BUTTON_STATE_TO_AGENT(mouse_press-
> >buttons_state) |
>                      (dz == -1 ? VD_AGENT_UBUTTON_MASK : 0) |
>                      (dz == 1 ? VD_AGENT_DBUTTON_MASK : 0);
> -                reds_handle_agent_mouse_event(&inputs_channel-
> >mouse_state);
> +                reds_handle_agent_mouse_event(reds, &inputs_channel-
> >mouse_state);
>              } else if (tablet) {
>                  SpiceTabletInterface *sif;
>                  sif = SPICE_CONTAINEROF(tablet->base.sif,
> SpiceTabletInterface, base);
> @@ -433,7 +433,7 @@ static int
> inputs_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, ui
>              if (reds_get_agent_mouse() && reds_has_vdagent()) {
>                  inputs_channel->mouse_state.buttons =
>                      RED_MOUSE_BUTTON_STATE_TO_AGENT(mouse_release-
> >buttons_state);
> -                reds_handle_agent_mouse_event(&inputs_channel-
> >mouse_state);
> +                reds_handle_agent_mouse_event(reds, &inputs_channel-
> >mouse_state);
>              } else if (tablet) {
>                  SpiceTabletInterface *sif;
>                  sif = SPICE_CONTAINEROF(tablet->base.sif,
> SpiceTabletInterface, base);
> diff --git a/server/reds.c b/server/reds.c
> index 4e0caba..11f0e1a 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -834,10 +834,11 @@ static void
> vdi_port_send_tokens_to_client(RedClient *client, uint32_t tokens, v
>  
>  static void vdi_port_on_free_self_token(void *opaque)
>  {
> +    RedsState *reds = opaque;
>  
>      if (inputs_inited() && reds->pending_mouse_event) {
>          spice_debug("pending mouse event");
> -        reds_handle_agent_mouse_event(inputs_get_mouse_state());
> +        reds_handle_agent_mouse_event(reds,
> inputs_get_mouse_state());
>      }
>  }
>  
> @@ -854,7 +855,7 @@ int reds_has_vdagent(void)
>      return !!vdagent;
>  }
>  
> -void reds_handle_agent_mouse_event(const VDAgentMouseState
> *mouse_state)
> +void reds_handle_agent_mouse_event(RedsState *reds, const
> VDAgentMouseState *mouse_state)
>  {
>      SpiceCharDeviceWriteBuffer *char_dev_buf;
>      VDInternalBuf *internal_buf;
> diff --git a/server/reds.h b/server/reds.h
> index e38a99a..76262ce 100644
> --- a/server/reds.h
> +++ b/server/reds.h
> @@ -60,7 +60,7 @@ void reds_unregister_channel(RedsState *reds,
> RedChannel *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
> +void reds_handle_agent_mouse_event(RedsState *reds, const
> VDAgentMouseState *mouse_state); // used by inputs_channel
>  
>  enum {
>      RED_RENDERER_INVALID,
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]