qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] virtio-gpu: skip update cursor in post_load if


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] virtio-gpu: skip update cursor in post_load if we don't have one
Date: Mon, 10 Jul 2017 13:50:56 +0200

On Mon, 2017-07-10 at 09:05 +0000, Marc-André Lureau wrote:
> 
> 
> On Mon, Jul 10, 2017 at 9:06 AM Gerd Hoffmann <address@hidden>
> wrote:
> > If the cursor resource id isn't set the guest didn't define a
> > cursor.
> > Skip the cursor update in post_load in that that case.
> 
> update_cursor() deals with resource_id == 0 already, but it also
> update the cursor position. What's the issue calling update_cursor()
> here?

Calling set_cursor(), then vnc client being confused by rich cursor.

> 
> > Reported-by: wanghaibin <address@hidden>
> > Signed-off-by: Gerd Hoffmann <address@hidden>
> > ---
> >  hw/display/virtio-gpu.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> > index 58dc0b2737..eef11083d7 100644
> > --- a/hw/display/virtio-gpu.c
> > +++ b/hw/display/virtio-gpu.c
> > @@ -1092,7 +1092,9 @@ static int virtio_gpu_load(QEMUFile *f, void
> > *opaque, size_t size,
> > 
> >          dpy_gfx_replace_surface(scanout->con, scanout->ds);
> >          dpy_gfx_update(scanout->con, 0, 0, scanout->width,
> > scanout->height);
> > -        update_cursor(g, &scanout->cursor);
> > +        if (scanout->cursor.resource_id) {
> > +            update_cursor(g, &scanout->cursor);
> > +        }
> >          res->scanout_bitmask |= (1 << i);
> >      }
> > 
> > --
> > 2.9.3
> > 
> > 
> > 
> 
> -- 
> Marc-André Lureau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]