Re: [linux/vd-agent] vdagent: Do not send empty screen resolution messages

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

 



Hi,

On Thu, Nov 15, 2018 at 03:33:17PM -0500, Frediano Ziglio wrote:
> > 
> > From: Victor Toso <me@xxxxxxxxxxxxxx>
> > 
> > Easier to trigger on Wayland guest by running
> > 
> > > xrandr --output XWAYLAND0 --rotate left
> > 
> > In current master, this causes the spice-vdagentd to disconnect from
> > the client. In 0.18 branch (latest release), mouse becomes unusable as
> > mentioned in the referred bug below.
> > 
> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1641723
> > 
> > Signed-off-by: Victor Toso <victortoso@xxxxxxxxxx>
> > ---
> >  src/vdagent/x11-randr.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/src/vdagent/x11-randr.c b/src/vdagent/x11-randr.c
> > index c5fba51..81a2cd6 100644
> > --- a/src/vdagent/x11-randr.c
> > +++ b/src/vdagent/x11-randr.c
> > @@ -959,6 +959,12 @@ no_info:
> >          }
> >      }
> >  
> > +    if (screen_count == 0) {
> > +        syslog(LOG_DEBUG, "Screen count is zero, are we on wayland?");
> > +        g_free(res);
> > +        return;
> > +    }
> > +
> >      if (x11->debug) {
> >          syslog(LOG_DEBUG, "Sending guest screen resolutions to vdagentd:");
> >          for (i = 0; i < screen_count; i++) {
> 
> Sounds reasonable.
> 
> Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Thanks,

> On the other hand looks like:
> - a bug in Wayland X11 emulation. Why Xrandr function fails?

It works fine with common resize of display. It fails with
rotate, maybe that's specific case. Don't really know.

> - partial. What happens to screen size? Does the mouse is limited
>   in a different are (can you move it all around the screen?)
>   Or maybe later another event with correct values arrives?

No other event. The logs show that when resizing, we get a log
with the correct values. When I run the xrandr command as pointed
in the commit log, the size of the message between session and
system agents are zero, because screen_count is zero. I saw that
this was not considered in the code and avoiding sending the
message seems enough.

Thanks again for the review,
Victor

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

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