[Spice-devel] [spice-server 2/2] cursor: Rename cursor_marshall to red_marshall_cursor_command

Christophe Fergeau cfergeau at redhat.com
Thu Apr 12 09:09:39 UTC 2018


On Wed, Apr 11, 2018 at 01:16:57PM -0400, Frediano Ziglio wrote:
> > 
> > The name is more consistent with red_marshall_cursor_init.
> > ---
> >  server/cursor-channel.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> > 
> 
> Why command (so red_marshall_cursor) ?
> The item is RED_PIPE_ITEM_TYPE_CURSOR.

I find red_marshall_cursor misleading, especially with
red_marshall_cursor_init. It might make sense it this was always setting
the cursor shape, but this is not even the case, this might cause cursor
to move, or to be hidden, .... This pipe item really wraps a
RedCursorCommand. I can rename it too.

Christophe

> 
> > diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> > index 522261e3f..a549c5fe0 100644
> > --- a/server/cursor-channel.c
> > +++ b/server/cursor-channel.c
> > @@ -142,9 +142,9 @@ static void red_marshall_cursor_init(CursorChannelClient
> > *ccc, SpiceMarshaller *
> >      spice_marshall_msg_cursor_init(base_marshaller, &msg);
> >  }
> >  
> > -static void cursor_marshall(CursorChannelClient *ccc,
> > -                            SpiceMarshaller *m,
> > -                            RedCursorPipeItem *cursor_pipe_item)
> > +static void red_marshall_cursor_command(CursorChannelClient *ccc,
> > +                                        SpiceMarshaller *m,
> > +                                        RedCursorPipeItem *cursor_pipe_item)
> >  {
> >      RedChannelClient *rcc = RED_CHANNEL_CLIENT(ccc);
> >      CursorChannel *cursor_channel =
> >      CURSOR_CHANNEL(red_channel_client_get_channel(rcc));
> > @@ -212,7 +212,7 @@ static void cursor_channel_send_item(RedChannelClient
> > *rcc, RedPipeItem *pipe_it
> >  
> >      switch (pipe_item->type) {
> >      case RED_PIPE_ITEM_TYPE_CURSOR:
> > -        cursor_marshall(ccc, m, SPICE_UPCAST(RedCursorPipeItem, pipe_item));
> > +        red_marshall_cursor_command(ccc, m, SPICE_UPCAST(RedCursorPipeItem,
> > pipe_item));
> >          break;
> >      case RED_PIPE_ITEM_TYPE_INVAL_ONE:
> >          red_marshall_inval(rcc, m, SPICE_CONTAINEROF(pipe_item,
> >          RedCacheItem, u.pipe_data));
> 
> Frediano
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180412/18c46c83/attachment.sig>


More information about the Spice-devel mailing list