[Spice-devel] [linux/vd-agent] vdagent: Do not send empty screen resolution messages
Victor Toso
victortoso at redhat.com
Fri Nov 16 08:59:12 UTC 2018
Hi,
On Thu, Nov 15, 2018 at 03:33:17PM -0500, Frediano Ziglio wrote:
> >
> > From: Victor Toso <me at victortoso.com>
> >
> > 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 at redhat.com>
> > ---
> > 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 at redhat.com>
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
-------------- 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/20181116/b754256e/attachment-0001.sig>
More information about the Spice-devel
mailing list