Re: [RFC PATCH spice-server v2 17/19] WIP cursor-channel: Allow to not handle a QXL device

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

 



> 
> On Wed, 2017-06-14 at 16:40 +0100, Frediano Ziglio wrote:
> > TODO: not a constant ID.
> > Christophe F was preparing a patch to get rid of the
> > qxl parameter to the CursorChannel.
> 
> It's fine that this part is split out to a separate commit, but it
> really needs additional explanation about why we're doing it: in what
> (future) scenario where qxl will be NULL, etc?
> 

Just in the 18/19 patch. But maybe you refer at the poor commit
message. In this case CursorChannel will be used for the stream
device in which case there's no QXL device.

Beside after the discussion with you about multiple monitor support
and Linux/Windows schema I think I'll attempt to allocate channels
dynamically so the id part will be quite different and also the
life management.

> 
> > 
> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > ---
> >  server/cursor-channel.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> > index a876113..4abcd53 100644
> > --- a/server/cursor-channel.c
> > +++ b/server/cursor-channel.c
> > @@ -94,7 +94,9 @@ static void cursor_item_unref(CursorItem *item)
> >          return;
> >  
> >      cursor_cmd = item->red_cursor;
> > -    red_qxl_release_resource(item->qxl, cursor_cmd-
> > >release_info_ext);
> > +    if (item->qxl) {
> > +        red_qxl_release_resource(item->qxl, cursor_cmd-
> > >release_info_ext);
> > +    }
> >      red_put_cursor_cmd(cursor_cmd);
> >      free(cursor_cmd);
> >  
> > @@ -297,7 +299,7 @@ CursorChannel* cursor_channel_new(RedsState
> > *server, QXLInstance *qxl,
> >                          "spice-server", server,
> >                          "core-interface", core,
> >                          "channel-type", SPICE_CHANNEL_CURSOR,
> > -                        "id", qxl->id,
> > +                        "id", qxl ? qxl->id : 1,
> >                          "migration-flags", 0,
> >                          "qxl", qxl,
> >                          "handle-acks", TRUE,
> 

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]